function sliceArrays(arrays, start, stop) {
	  if (arrays == null) {
	    return [null];
	  } else if (Array.isArray(arrays)) {
	    return arrays.map(function (array) {
	      return sliceAlongFirstAxis(array, start, stop - start);
	    });
	  } else {
	    // Tensor.
	    return sliceAlongFirstAxis(arrays, start, stop - start);
	  }
	}
Slice a Tensor or an Array of Tensors, by start and stop indices.

Porting Note: The `_slice_arrays` function in PyKeras is covered by this
  function and `sliceArraysByIndices()` together.

@param arrays: the input.
@param start: the starting index (inclusive).
@param stop: the stopping index (exclusive).
@returns The result of the slicing. If `arrays` is an `Array` of
  `tf.Tensor`s, the slicing will be applied to all elements of the `Array`
  in the same way.