code: def _run(  # type: ignore
      self,
      X,
      rois,
      batch_indices,
      coordinate_transformation_mode=None,
      mode=None,
      output_height=None,
      output_width=None,
      sampling_ratio=None,
      spatial_scale=None,
  ):
      coordinate_transformation_mode = coordinate_transformation_mode or self.coordinate_transformation_mode  # type: ignore
      mode = mode or self.mode  # type: ignore
      output_height = output_height or self.output_height  # type: ignore
      output_width = output_width or self.output_width  # type: ignore
      sampling_ratio = sampling_ratio or self.sampling_ratio  # type: ignore
      spatial_scale = spatial_scale or self.spatial_scale  # type: ignore
  
      num_channels = X.shape[1]
      num_rois = batch_indices.shape[0]
      num_roi_cols = rois.shape[1]
  
      y_dims = (num_rois, num_channels, output_height, output_width)
      Y = np.empty(y_dims, dtype=X.dtype).flatten()
  
      self.roi_align_forward(
          y_dims,
          X.flatten(),
          spatial_scale,
          X.shape[2],  # height, 3
          X.shape[3],  # width, 4
          sampling_ratio,
          rois.flatten(),
          num_roi_cols,
          Y,
          mode.lower(),
          coordinate_transformation_mode.lower() == "half_pixel",
          batch_indices.flatten(),
      )
      return (Y.reshape(y_dims).astype(X.dtype),)
  
file_path: onnx/onnx/reference/ops/op_roi_align.py
imports: from typing import Tuple
  import numpy
  from onnx.reference.op_run import OpRun
label_desc: Use image node_id 3 for calling the RoiAlign obj's underlying member method code with example usage: obj._run(X, rois, batch_indices, coordinate_transformation_mode, mode, output_height, output_width, sampling_ratio, spatial_scale) and returns: Y