docstr: Performs a batch gather by making recursive calls to np.take().
  
  This is used by testBatchDims() to construct the expected value.
  
  Args:
    params: A numpy array
    indices: A numpy array
    axis: An integer
    batch_dims: An integer
  Returns:
    A numpy array
code: def _batchNumpyGather(self, params, indices, axis, batch_dims):
      """Performs a batch gather by making recursive calls to np.take().
  
      This is used by testBatchDims() to construct the expected value.
  
      Args:
        params: A numpy array
        indices: A numpy array
        axis: An integer
        batch_dims: An integer
      Returns:
        A numpy array
      """
      if batch_dims == 0:
          return np.take(params, indices, axis=axis)
      self.assertEqual(params.shape[0], indices.shape[0])
      if axis > 0:
          axis -= 1
      return np.stack(
          [
              self._batchNumpyGather(
                  params[i], indices[i], axis, batch_dims - 1
              )
              for i in range(params.shape[0])
          ]
      )
  
imports: from absl.testing import parameterized
  import numpy
  from tensorflow.python.eager import backprop
  from tensorflow.python.eager import def_function
  from tensorflow.python.framework import constant_op
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors
  from tensorflow.python.framework import indexed_slices
  from tensorflow.python.framework import ops
  from tensorflow.python.framework import tensor_spec
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import gradient_checker_v2
  from tensorflow.python.ops import gradients_impl
  from tensorflow.python.ops import math_ops
  from tensorflow.python.ops import ref_variable
  from tensorflow.python.ops import resource_variable_ops
  from tensorflow.python.ops import variables
  from tensorflow.python.platform import test
label_desc: Use image node_id 18 for calling the GatherTest obj's underlying member method code with example usage: obj._batchNumpyGather(params, indices, axis, batch_dims) and returns: np, np