code: def testReduceMax(self, index_dtype):
      def reference_max(dtype, inp, axis):
          """Wrapper around np.amax that returns -infinity for an empty input."""
          if inp.shape[axis] == 0:
              if np.issubdtype(dtype, np.floating):
                  return np.full(
                      inp.shape[0:axis] + inp.shape[axis + 1 :],
                      float("-inf"),
                  )
              return np.full(
                  inp.shape[0:axis] + inp.shape[axis + 1 :],
                  np.iinfo(dtype).min,
              )
          return np.amax(inp, axis)
  
      for dtype in set(self.all_types).intersection(
          [np.float32, np.int32, np.int64]
      ):
          self._testReduction(
              math_ops.reduce_max,
              functools.partial(reference_max, dtype),
              dtype,
              self.REAL_DATA,
              index_dtype,
          )
  
imports: import functools
  import itertools
  from absl.testing import parameterized
  import numpy
  from tensorflow.compiler.tests import xla_test
  from tensorflow.python.framework import dtypes
  from tensorflow.python.framework import errors_impl
  from tensorflow.python.framework import test_util
  from tensorflow.python.ops import array_ops
  from tensorflow.python.ops import math_ops
  from tensorflow.python.platform import googletest
label_desc: Use image node_id 7 for calling the ReduceOpsTest obj's underlying member method code with example usage: obj.testReduceMax(index_dtype) and returns: np, np, np