class_docstr: This adapter adapts np.ndarray, a list of np.ndarray, and a dict of
  np.ndarray into a tf.keras.utils.Sequence instance.
class_docstr_tok: ["This","adapter","adapts","np.ndarray",",","a","list","of","np.ndarray",",","and","a","dict","of","np.ndarray","into","a","tf.keras.utils.Sequence","instance","."]
code: def __getitem__(
      self, index: int
  ) -> Union[
      Tuple[ArrayLike, ArrayLike],
      Tuple[ArrayLike, ArrayLike, np.ndarray],
  ]:
      # Gets batch at position index.
      start = index * self.batch_size
      # The end is not `(index + 1) * self.batch_size` if the
      # last batch is not a full `self.batch_size`
      end = min((index + 1) * self.batch_size, self._x_length)
  
      if self.sample_weight is None:
          return (
              _get_elements_in_multi_arraylike(self.x, start, end),
              _get_elements_in_multi_arraylike(self.y, start, end),
          )
      else:
          return (
              _get_elements_in_multi_arraylike(self.x, start, end),
              _get_elements_in_multi_arraylike(self.y, start, end),
              self.sample_weight[start:end],
          )
  
file_path: determined/harness/determined/keras/_data.py
imports: import math
  from typing import Any, Dict, List, Optional, Tuple, Union
  import numpy
  import tensorflow
  import determined
  from determined import keras
  from determined.common import check
label_desc: Use image node_id 3 for calling the _ArrayLikeAdapter obj's underlying member method code with example usage: obj.__getitem__(index) and returns: _get_elements_in_multi_arraylike,  _get_elements_in_multi_arraylike, _get_elements_in_multi_arraylike,  _get_elements_in_multi_arraylike,  self