code: def _read_indices(path):
      """Returns (files_name, list of index in each file).
  
      Args:
        path: path to index, omitting suffix.
      """
      paths = sorted(tf.io.gfile.glob("%s-*-of-*_index.json" % path))
      all_indices = []
      for path in paths:
          json_str = epath.Path(path).read_text()
          # parse it back into a proto.
          shard_index = json.loads(json_str)
          all_indices.append(list(shard_index["index"]))
      return [os.path.basename(p) for p in paths], all_indices
  
imports: import json
  import os
  from typing import Optional
  from unittest import mock
  from etils import epath
  import tensorflow
  from tensorflow_datasets import testing
  from tensorflow_datasets.core import dataset_utils
  from tensorflow_datasets.core import example_parser
  from tensorflow_datasets.core import file_adapters
  from tensorflow_datasets.core import lazy_imports_lib
  from tensorflow_datasets.core import naming
  from tensorflow_datasets.core import writer
  from tensorflow_datasets.core.utils import shard_utils
  from tensorflow_datasets.core.writer import _ShardSpec
label_desc: Use image node_id 2 for calling a global function with example usage: _read_indices(path) and returns: unknown,  all_indices