code: def export_momentum() -> None:
      # Define operator attributes.
      norm_coefficient = 0.001
      alpha = 0.95
      beta = 0.1
  
      # Create operator.
      node = onnx.helper.make_node(
          "Momentum",
          inputs=["R", "T", "X", "G", "V"],
          outputs=["X_new", "V_new"],
          norm_coefficient=norm_coefficient,
          alpha=alpha,
          beta=beta,
          mode="standard",
          domain=AI_ONNX_PREVIEW_TRAINING_DOMAIN,
      )
  
      # Define operator inputs.
      r = np.array(0.1, dtype=np.float32)  # scalar
      t = np.array(0, dtype=np.int64)  # scalar
      x = np.array([1.2, 2.8], dtype=np.float32)
      g = np.array([-0.94, -2.5], dtype=np.float32)
      v = np.array([1.7, 3.6], dtype=np.float32)
  
      # Compute expected outputs of Momentum.
      x_new, v_new = apply_momentum(
          r, t, x, g, v, norm_coefficient, alpha, beta
      )
  
      # Check results.
      expect(
          node,
          inputs=[r, t, x, g, v],
          outputs=[x_new, v_new],
          name="test_momentum",
          opset_imports=[
              onnx.helper.make_opsetid(
                  AI_ONNX_PREVIEW_TRAINING_DOMAIN, 1
              )
          ],
      )
  
file_path: onnx/onnx/backend/test/case/node/momentum.py
imports: import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import expect
  from onnx.defs import AI_ONNX_PREVIEW_TRAINING_DOMAIN
label_desc: Use image node_id 1 for calling the Momentum obj's underlying member method code with example usage: obj.export_momentum() without return types