code: def backward(ctx, grad_output):
      feature_size = ctx.feature_size
      spatial_scale = ctx.spatial_scale
      aligned = ctx.aligned
      clockwise = ctx.clockwise
      sample_num = ctx.sample_num
      rois = ctx.saved_tensors[0]
      assert feature_size is not None
      batch_size, num_channels, data_height, data_width = feature_size
  
      out_w = grad_output.size(3)
      out_h = grad_output.size(2)
  
      grad_input = grad_rois = None
  
      if ctx.needs_input_grad[0]:
          grad_input = rois.new_zeros(
              batch_size, num_channels, data_height, data_width
          )
          ext_module.roi_align_rotated_backward(
              grad_output.contiguous(),
              rois,
              grad_input,
              pooled_height=out_h,
              pooled_width=out_w,
              spatial_scale=spatial_scale,
              sample_num=sample_num,
              aligned=aligned,
              clockwise=clockwise,
          )
      return grad_input, grad_rois, None, None, None, None, None
  
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 3 for calling the RoIAlignRotatedFunction obj's underlying member method code with example usage: obj.backward(ctx, grad_output) and returns: grad_input,  grad_rois,  None,  None,  None,  None,  None