code: def forward(
      ctx,
      features,
      rois,
      out_size,
      spatial_scale,
      sample_num=0,
      aligned=True,
      clockwise=False,
  ):
      if isinstance(out_size, int):
          out_h = out_size
          out_w = out_size
      elif isinstance(out_size, tuple):
          assert len(out_size) == 2
          assert isinstance(out_size[0], int)
          assert isinstance(out_size[1], int)
          out_h, out_w = out_size
      else:
          raise TypeError(
              '"out_size" must be an integer or tuple of integers'
          )
      ctx.spatial_scale = spatial_scale
      ctx.sample_num = sample_num
      ctx.aligned = aligned
      ctx.clockwise = clockwise
      ctx.save_for_backward(rois)
      ctx.feature_size = features.size()
  
      (
          batch_size,
          num_channels,
          data_height,
          data_width,
      ) = features.size()
      num_rois = rois.size(0)
  
      output = features.new_zeros(num_rois, num_channels, out_h, out_w)
      ext_module.roi_align_rotated_forward(
          features,
          rois,
          output,
          pooled_height=out_h,
          pooled_width=out_w,
          spatial_scale=spatial_scale,
          sample_num=sample_num,
          aligned=aligned,
          clockwise=clockwise,
      )
      return output
  
file_path: lavis/lavis/common/annotator/uniformer/mmcv/ops/roi_align_rotated.py
imports: import torch.nn
  from torch.autograd import Function
  from ..utils import ext_loader
label_desc: Use image node_id 2 for calling the RoIAlignRotatedFunction obj's underlying member method code with example usage: obj.forward(ctx, features, rois, out_size, spatial_scale, sample_num, aligned, clockwise) and returns: output