code: def export() -> None:
      node = onnx.helper.make_node(
          "Hardmax",
          inputs=["x"],
          outputs=["y"],
      )
  
      x = np.array(
          [[3, 0, 1, 2], [2, 5, 1, 0], [0, 1, 3, 2], [0, 1, 2, 3]]
      ).astype(np.float32)
      # expect result:
      # [[1. 0. 0. 0.]
      # [0. 1. 0. 0.]
      # [0. 0. 1. 0.]
      # [0. 0. 0. 1.]]
      y = hardmax(x)
      expect(node, inputs=[x], outputs=[y], name="test_hardmax_example")
  
      # For multiple occurrences of the maximal values, the first occurrence is selected for one-hot output
      x = np.array([[3, 3, 3, 1]]).astype(np.float32)
      # expect result:
      # [[1, 0, 0, 0]]
      y = hardmax(x)
      expect(node, inputs=[x], outputs=[y], name="test_hardmax_one_hot")
  
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 the Hardmax obj's underlying member method code with example usage: obj.export() without return types