code: def getitem_to_records(tensor, tensor_index):
      """
      Compute the records of `__getitem__` on tensor for every chunk.
  
      Returns
      -------
          records and output_chunk dict, records is a dict of chunk index to records
          in that chunk.
      """
      (
          output_shape,
          output_chunks,
          nsplits_acc,
      ) = compute_output_of_indexing(tensor, tensor_index)
  
      records = dict()
      for output_chunk in output_chunks:
          records_in_chunk = getitem_on_chunk_to_records(
              nsplits_acc, output_chunk
          )
          records[output_chunk.op.inputs[0].index] = records_in_chunk
      return records, output_shape
  
file_path: mars/mars/services/mutable/utils.py
imports: from datetime import datetime
  import itertools
  from numbers import Integral
  from typing import Optional
  import uuid
  import numpy
  from ...core import tile
label_desc: Use image node_id 6 for calling a global function with example usage: getitem_to_records(tensor, tensor_index) and returns: records,  output_shape