code: def hardmax(x: np.ndarray, axis: int = -1) -> np.ndarray:
      x_argmax = np.argmax(x, axis=axis)
      y = np.zeros_like(x)
      np.put_along_axis(
          y, np.expand_dims(x_argmax, axis=axis), 1, axis=axis
      )
      return y
  
file_path: onnx/onnx/backend/test/case/node/hardmax.py
imports: import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import expect
label_desc: Use image node_id 1 for calling a global function with example usage: hardmax(x, axis) and returns: y