code: def amax(a, axis=None, out=None, keepdims=False):
      """Returns the maximum of an array or the maximum along an axis.
  
      .. note::
  
         When at least one element is NaN, the corresponding min value will be
         NaN.
  
      Args:
          a (cupy.ndarray): Array to take the maximum.
          axis (int): Along which axis to take the maximum. The flattened array
              is used by default.
          out (cupy.ndarray): Output array.
          keepdims (bool): If ``True``, the axis is remained as an axis of
              size one.
  
      Returns:
          cupy.ndarray: The maximum of ``a``, along the axis if specified.
  
      .. note::
         When cuTENSOR accelerator is used, the output value might be collapsed
         for reduction axes that have one or more NaN elements.
  
      .. seealso:: :func:`numpy.amax`
  
      """
      if _fusion_thread_local.is_fusing():
          if keepdims:
              raise NotImplementedError(
                  "cupy.amax does not support `keepdims` in fusion yet."
              )
          return _fusion_thread_local.call_reduction(
              _statistics.amax, a, axis=axis, out=out
          )
  
      # TODO(okuta): check type
      return a.max(axis=axis, out=out, keepdims=keepdims)
  
file_path: cupy/cupy/_statistics/order.py
imports: import warnings
  import cupy
  from cupy import _core
  from cupy._core import _routines_statistics
  from cupy._core import _fusion_thread_local
  from cupy._logic import content
label_desc: Use image node_id 2 for calling a global function with example usage: amax(a, axis, out, keepdims) and returns: a, _fusion_thread_local