code: def export_resize_downsample_scales_nearest() -> None:
      node = onnx.helper.make_node(
          "Resize",
          inputs=["X", "", "scales"],
          outputs=["Y"],
          mode="nearest",
      )
  
      data = np.array(
          [
              [
                  [
                      [1, 2, 3, 4],
                      [5, 6, 7, 8],
                  ]
              ]
          ],
          dtype=np.float32,
      )
  
      scales = np.array([1.0, 1.0, 0.6, 0.6], dtype=np.float32)
  
      # [[[[1. 3.]]]]
      output = interpolate_nd(
          data, lambda x, _: nearest_coeffs(x), scale_factors=scales
      ).astype(np.float32)
  
      expect(
          node,
          inputs=[data, scales],
          outputs=[output],
          name="test_resize_downsample_scales_nearest",
      )
  
imports: import numpy
  import onnx
  from onnx.backend.test.case.base import Base
  from onnx.backend.test.case.node import expect
  from onnx.reference.ops.op_resize import _cubic_coeffs
  from onnx.reference.ops.op_resize import _cubic_coeffs_antialias
  from onnx.reference.ops.op_resize import _interpolate_nd
  from onnx.reference.ops.op_resize import _linear_coeffs
  from onnx.reference.ops.op_resize import _linear_coeffs_antialias
  from onnx.reference.ops.op_resize import _nearest_coeffs
label_desc: Use image node_id 2 for calling the Resize obj's underlying member method code with example usage: obj.export_resize_downsample_scales_nearest() without return types