code: def export_roialign_mode_max() -> None:
      X = np.array(
          [
              [
                  [
                      [
                          0.2764,
                          0.715,
                          0.1958,
                          0.3416,
                          0.4638,
                          0.0259,
                          0.2963,
                          0.6518,
                          0.4856,
                          0.725,
                      ],
                      [
                          0.9637,
                          0.0895,
                          0.2919,
                          0.6753,
                          0.0234,
                          0.6132,
                          0.8085,
                          0.5324,
                          0.8992,
                          0.4467,
                      ],
                      [
                          0.3265,
                          0.8479,
                          0.9698,
                          0.2471,
                          0.9336,
                          0.1878,
                          0.4766,
                          0.4308,
                          0.34,
                          0.2162,
                      ],
                      [
                          0.0206,
                          0.172,
                          0.2155,
                          0.4394,
                          0.0653,
                          0.3406,
                          0.7724,
                          0.3921,
                          0.2541,
                          0.5799,
                      ],
                      [
                          0.4062,
                          0.2194,
                          0.4473,
                          0.4687,
                          0.7109,
                          0.9327,
                          0.9815,
                          0.632,
                          0.1728,
                          0.6119,
                      ],
                      [
                          0.3097,
                          0.1283,
                          0.4984,
                          0.5068,
                          0.4279,
                          0.0173,
                          0.4388,
                          0.043,
                          0.4671,
                          0.7119,
                      ],
                      [
                          0.1011,
                          0.8477,
                          0.4726,
                          0.1777,
                          0.9923,
                          0.4042,
                          0.1869,
                          0.7795,
                          0.9946,
                          0.9689,
                      ],
                      [
                          0.1366,
                          0.3671,
                          0.7011,
                          0.6234,
                          0.9867,
                          0.5585,
                          0.6985,
                          0.5609,
                          0.8788,
                          0.9928,
                      ],
                      [
                          0.5697,
                          0.8511,
                          0.6711,
                          0.9406,
                          0.8751,
                          0.7496,
                          0.165,
                          0.1049,
                          0.1559,
                          0.2514,
                      ],
                      [
                          0.7012,
                          0.4056,
                          0.7879,
                          0.3461,
                          0.0415,
                          0.2998,
                          0.5094,
                          0.3727,
                          0.5482,
                          0.0502,
                      ],
                  ]
              ]
          ],
          dtype=np.float32,
      )
      rois = np.array(
          [
              [0.0, 0.0, 9.0, 9.0],
              [0.0, 5.0, 4.0, 9.0],
              [5.0, 5.0, 9.0, 9.0],
          ],
          dtype=np.float32,
      )
      batch_indices = np.array([0, 0, 0], dtype=np.int64)
  
      Y = np.array(
          [
              [
                  [
                      [
                          0.3445228,
                          0.37310338,
                          0.37865096,
                          0.446696,
                          0.37991184,
                      ],
                      [
                          0.4133513,
                          0.5455125,
                          0.6651902,
                          0.55805874,
                          0.27110294,
                      ],
                      [
                          0.21223956,
                          0.40924096,
                          0.8417618,
                          0.792561,
                          0.37196714,
                      ],
                      [
                          0.46835402,
                          0.39741728,
                          0.8012819,
                          0.4969306,
                          0.5495158,
                      ],
                      [
                          0.3595896,
                          0.5196813,
                          0.5403741,
                          0.23814403,
                          0.19992709,
                      ],
                  ]
              ],
              [
                  [
                      [
                          0.30517197,
                          0.5086199,
                          0.3189761,
                          0.4054401,
                          0.47630402,
                      ],
                      [
                          0.50862,
                          0.8477,
                          0.37808004,
                          0.24936005,
                          0.79384017,
                      ],
                      [
                          0.17620805,
                          0.29368007,
                          0.44870415,
                          0.4987201,
                          0.63148826,
                      ],
                      [
                          0.51066005,
                          0.8511,
                          0.5368801,
                          0.9406,
                          0.70008016,
                      ],
                      [
                          0.4487681,
                          0.51066035,
                          0.5042561,
                          0.5643603,
                          0.42004836,
                      ],
                  ]
              ],
              [
                  [
                      [
                          0.21062402,
                          0.3510401,
                          0.37416005,
                          0.5967599,
                          0.46507207,
                      ],
                      [
                          0.32336006,
                          0.31180006,
                          0.6236001,
                          0.9946,
                          0.7751202,
                      ],
                      [
                          0.35744014,
                          0.5588001,
                          0.35897616,
                          0.7030401,
                          0.6353923,
                      ],
                      [
                          0.5996801,
                          0.27940005,
                          0.17948808,
                          0.35152006,
                          0.31769615,
                      ],
                      [
                          0.3598083,
                          0.40752012,
                          0.2385281,
                          0.43856013,
                          0.26313624,
                      ],
                  ]
              ],
          ],
          dtype=np.float32,
      )
  
      node = onnx.helper.make_node(
          "RoiAlign",
          inputs=["X", "rois", "batch_indices"],
          mode="max",
          outputs=["Y"],
          spatial_scale=1.0,
          output_height=5,
          output_width=5,
          sampling_ratio=2,
          coordinate_transformation_mode="output_half_pixel",
      )
  
      expect(
          node,
          inputs=[X, rois, batch_indices],
          outputs=[Y],
          name="test_roialign_mode_max",
      )
  
file_path: onnx/onnx/backend/test/case/node/roialign.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 3 for calling the RoiAlign obj's underlying member method code with example usage: obj.export_roialign_mode_max() without return types