code: def test_gather_vectorized(self):
      values = tf.constant([[[1, 2], [3, 4]], [[5, 6], [7, 8]]])
      index = IndexMap(
          indices=tf.convert_to_tensor([[0, 1], [1, 0]]),
          num_segments=2,
          batch_dims=1,
      )
      result = gather(values, index)
  
      # We use np.testing.assert_array_equal rather than Tensorflow's assertAllEqual
      np.testing.assert_array_equal(
          result.numpy(), [[[1, 2], [3, 4]], [[7, 8], [5, 6]]]
      )
  
imports: from __future__ import annotations
  import copy
  import unittest
  import numpy
  import pandas
  from transformers import TF_MODEL_FOR_CAUSAL_LM_MAPPING, TF_MODEL_FOR_MASKED_LM_MAPPING, TF_MODEL_FOR_MULTIPLE_CHOICE_MAPPING, TF_MODEL_FOR_NEXT_SENTENCE_PREDICTION_MAPPING, TF_MODEL_FOR_PRETRAINING_MAPPING, TF_MODEL_FOR_SEQ_TO_SEQ_CAUSAL_LM_MAPPING, TF_MODEL_FOR_SEQUENCE_CLASSIFICATION_MAPPING, TF_MODEL_FOR_TABLE_QUESTION_ANSWERING_MAPPING, TF_MODEL_FOR_TOKEN_CLASSIFICATION_MAPPING, TapasConfig, TapasTokenizer, is_tf_available
  from transformers.models.auto import get_values
  from transformers.testing_utils import require_tensorflow_probability, require_tf, slow
  from transformers.utils import cached_property
  from ...test_configuration_common import ConfigTester
  from ...test_modeling_tf_common import TFModelTesterMixin, ids_tensor, random_attention_mask
  from ...test_pipeline_mixin import PipelineTesterMixin
label_desc: Use image node_id 10 for calling the TFTapasUtilsTest obj's underlying member method code with example usage: obj.test_gather_vectorized() without return types