code: def forward(
      ctx,
      data,
      rois,
      offset,
      spatial_scale,
      out_size,
      out_channels,
      no_trans,
      group_size=1,
      part_size=None,
      sample_per_part=4,
      trans_std=0.0,
  ):
      ctx.spatial_scale = spatial_scale
      ctx.out_size = out_size
      ctx.out_channels = out_channels
      ctx.no_trans = no_trans
      ctx.group_size = group_size
      ctx.part_size = out_size if part_size is None else part_size
      ctx.sample_per_part = sample_per_part
      ctx.trans_std = trans_std
  
      assert 0.0 <= ctx.trans_std <= 1.0
  
      n = rois.shape[0]
      output = data.new_empty(n, out_channels, out_size, out_size)
      output_count = data.new_empty(n, out_channels, out_size, out_size)
      if not data.is_cuda and dcn_cpu_ready:
          deform_pool_cpu.deform_psroi_pooling_cpu_forward(
              data,
              rois,
              offset,
              output,
              output_count,
              ctx.no_trans,
              ctx.spatial_scale,
              ctx.out_channels,
              ctx.group_size,
              ctx.out_size,
              ctx.part_size,
              ctx.sample_per_part,
              ctx.trans_std,
          )
      elif data.is_cuda and dcn_cuda_ready:
          deform_pool_cuda.deform_psroi_pooling_cuda_forward(
              data,
              rois,
              offset,
              output,
              output_count,
              ctx.no_trans,
              ctx.spatial_scale,
              ctx.out_channels,
              ctx.group_size,
              ctx.out_size,
              ctx.part_size,
              ctx.sample_per_part,
              ctx.trans_std,
          )
      else:
          device_ = input.device.type
          raise RuntimeError(
              "Input type is {}, but 'deform_conv_{}.*.so' is not imported successfully.".format(
                  device_, device_
              ),
          )
  
      if (
          data.requires_grad
          or rois.requires_grad
          or offset.requires_grad
      ):
          ctx.save_for_backward(data, rois, offset)
      ctx.output_count = output_count
  
      return output
  
file_path: EasyOCR/easyocr/DBNet/assets/ops/dcn/functions/deform_pool.py
imports: import os
  import warnings
  import torch
  from torch.autograd import Function
  from torch.utils import cpp_extension
label_desc: Use image node_id 1 for calling the DeformRoIPoolingFunction obj's underlying member method code with example usage: obj.forward(ctx, data, rois, offset, spatial_scale, out_size, out_channels, no_trans, group_size, part_size, sample_per_part, trans_std) and returns: output