code: def test_range_index_map(self):
      batch_shape = [3, 4]
      num_segments = 5
      index = range_index_map(batch_shape, num_segments)
  
      self.assertEqual(num_segments, index.num_segments)
      self.assertEqual(2, index.batch_dims)
      indices = index.indices
      # We use np.testing.assert_array_equal rather than Tensorflow's assertAllEqual
      np.testing.assert_array_equal(list(indices.size()), [3, 4, 5])
      for i in range(batch_shape[0]):
          for j in range(batch_shape[1]):
              # We use np.testing.assert_array_equal rather than Tensorflow's assertAllEqual
              np.testing.assert_array_equal(
                  indices[i, j, :].numpy(), range(num_segments)
              )
  
imports: import copy
  import unittest
  import numpy
  import pandas
  from transformers import MODEL_FOR_CAUSAL_LM_MAPPING, MODEL_FOR_MASKED_LM_MAPPING, MODEL_FOR_MULTIPLE_CHOICE_MAPPING, MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING, MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING, MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING, MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING, MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING, TapasConfig, is_torch_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import require_tensorflow_probability, require_torch, slow, torch_device
  from transformers.utils import cached_property
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_common import ModelTesterMixin, floats_tensor, ids_tensor, random_attention_mask
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 4 for calling the TapasUtilitiesTest obj's underlying member method code with example usage: obj.test_range_index_map() without return types