code: def __get_index_map(
      sample_ids: List[str],
      sample_block_count: int,
      sql_ctx: SQLContext,
  ) -> Dict[str, List[str]]:
      """
      Creates an index mapping from sample blocks to a list of corresponding sample IDs. Uses the same sample-blocking
      logic as the blocked GT matrix transformer.
  
      Requires that:
          - Each variant row has the same number of values
          - The number of values per row matches the number of sample IDs
  
      Args:
          sample_ids : The list of sample ID strings
          sample_block_count : The number of sample blocks
  
      Returns:
          index mapping from sample block IDs to a list of sample IDs
      """
  
      assert check_argument_types()
  
      sample_id_df = sql_ctx.createDataFrame([Row(values=sample_ids)])
      make_sample_blocks_fn = (
          SparkContext._jvm.io.projectglow.transformers.blockvariantsandsamples.VariantSampleBlockMaker.makeSampleBlocks
      )
      output_jdf = make_sample_blocks_fn(
          sample_id_df._jdf, sample_block_count
      )
      output_df = DataFrame(output_jdf, sql_ctx)
      index_map = {
          r.sample_block: r.values for r in output_df.collect()
      }
  
      assert check_return_type(index_map)
      return index_map
  
file_path: glow/python/glow/wgr/wgr_functions.py
imports: from glow import glow
  import pandas
  import numpy
  from pyspark import SparkContext
  from pyspark.sql import DataFrame, Row, SparkSession, SQLContext
  from typeguard import check_argument_types, check_return_type
  from typing import Any, Dict, List
  from nptyping import Float, NDArray
  from .ridge_reduction import RidgeReduction
  from .ridge_regression import RidgeRegression
  from .logistic_ridge_regression import LogisticRidgeRegression
label_desc: Use image node_id 3 for calling a global function with example usage: __get_index_map(sample_ids, sample_block_count, sql_ctx) and returns: index_map