code: def get_row_group_indexes(dataset):
      """
      Extract and return row group indexes from dataset
      :param dataset: dataset object
      :return: dataset indexes as dictionary
      """
      if not dataset.common_metadata:
          raise ValueError(
              "Could not find _metadata file. add_dataset_metadata(..) in"
              " petastorm.etl.dataset_metadata.py should be used to"
              " generate this file in your ETL code."
              " You can generate it on an existing dataset using rowgroup_indexing_run.py"
          )
  
      dataset_metadata_dict = dataset.common_metadata.metadata
  
      # Load rowgroups_index
      if ROWGROUPS_INDEX_KEY not in dataset_metadata_dict:
          raise ValueError(
              "Row groups index is not available in the dataset metadata file. "
              "You can generate it on an existing dataset using rowgroup_indexing_run.py"
          )
  
      serialized_indexes = dataset_metadata_dict[ROWGROUPS_INDEX_KEY]
  
      index_dict = depickle_legacy_package_name_compatible(
          serialized_indexes
      )
      return index_dict
  
file_path: petastorm/petastorm/etl/rowgroup_indexing.py
imports: import logging
  import time
  from collections import namedtuple
  from pyarrow import parquet
  from six.moves import cPickle
  from six.moves import range
  from petastorm import utils
  from petastorm.etl import dataset_metadata
  from petastorm.etl.legacy import depickle_legacy_package_name_compatible
  from petastorm.fs_utils import FilesystemResolver
label_desc: Use image node_id 4 for calling a global function with example usage: get_row_group_indexes(dataset) and returns: index_dict