class_docstr: Implements the reduce logic.
  It must have a parameter *axes*.
class_docstr_tok: ["Implements","the","reduce","logic",".","It","must","have","a","parameter","*","axes","*","."]
code: def handle_axes(self, axes):  # noqa: PLR0911
      if isinstance(axes, tuple):
          if len(axes) == 0:
              return None
          return axes
      if axes is None:
          return None
      if isinstance(axes, (int, tuple)):
          return axes
      if not isinstance(axes, np.ndarray):
          raise TypeError(f"axes must be an array, not {type(axes)}.")
      if len(axes.shape) == 0:
          return int(axes)
      if 0 in axes.shape:
          return None
      return tuple(axes.ravel().tolist())
  
imports: from typing import Any, Dict
  import numpy
  from onnx.onnx_pb import NodeProto
  from onnx.reference.op_run import OpRun, RuntimeTypeError
label_desc: Use image node_id 3 for calling the OpRunReduceNumpy obj's underlying member method code with example usage: obj.handle_axes(axes) and returns: tuple, axes, None, axes, int, None, None