code: def index_data(x, i):
      if isinstance(x, np.ndarray):
          return x[i]
      elif isinstance(x, dict):
          res = {}
          for k, v in x.items():
              res[k] = v[i]
          return res
      elif isinstance(x, tuple):
          return tuple(item[i] for item in x)
      elif isinstance(x, list):
          return [item[i] for item in x]
      else:
          raise ValueError(
              "data should be an ndarray, a dict of ndarrays, a tuple of ndarrays"
              " or a list of ndarrays, please check your input"
          )
  
imports: import os
  import numpy
  from zoo.common import get_file_list
  from zoo.util.utils import convert_row_to_numpy
label_desc: Use image node_id 17 for calling a global function with example usage: index_data(x, i) and returns: x, res, tuple, unknown