code: def testPoolTensor1d(self, pool_fn, pool_fn_mtf):
      converter = mtf_test_utils.NumpyConverter()
      pool_size = 2
      x = np.random.randn(2, 3, 4, 5)
      expected = np.empty(shape=[2, 3, 2, 5])
      expected[:, :, 0, :] = pool_fn(x[:, :, 0:2, :], axis=2)
      expected[:, :, 1, :] = pool_fn(x[:, :, 2:4, :], axis=2)
  
      x_mtf = converter.convert_np_array_to_mtf_tensor(
          x, dtype=tf.float32
      )
      pooled_mtf = mtf.pool_tensor_1d(
          x_mtf,
          pool_dim=x_mtf.shape.dims[2],
          reduce_fn=pool_fn_mtf,
          pool_size=pool_size,
      )
      actual = converter.convert_mtf_tensor_to_np_array(pooled_mtf)
      self.assertAllClose(expected, actual)
  
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from absl.testing import parameterized
  import mesh_tensorflow
  from mesh_tensorflow import test_utils
  import numpy
  import tensorflow.compat.v1
  from tensorflow.python.framework import test_util
label_desc: Use image node_id 13 for calling the MeshTensorFlowTest obj's underlying member method code with example usage: obj.testPoolTensor1d(pool_fn, pool_fn_mtf) without return types