code: def forward(
      ctx,
      input,
      offset,
      mask,
      weight,
      bias=None,
      stride=1,
      padding=0,
      dilation=1,
      groups=1,
      deformable_groups=1,
  ):
      ctx.stride = stride
      ctx.padding = padding
      ctx.dilation = dilation
      ctx.groups = groups
      ctx.deformable_groups = deformable_groups
      ctx.with_bias = bias is not None
      if not ctx.with_bias:
          bias = input.new_empty(1)  # fake tensor
  
      if (
          weight.requires_grad
          or mask.requires_grad
          or offset.requires_grad
          or input.requires_grad
      ):
          ctx.save_for_backward(input, offset, mask, weight, bias)
      output = input.new_empty(
          ModulatedDeformConvFunction._infer_shape(ctx, input, weight)
      )
      ctx._bufs = [input.new_empty(0), input.new_empty(0)]
      if not input.is_cuda and dcn_cpu_ready:
          deform_conv_cpu.modulated_deform_conv_cpu_forward(
              input,
              weight,
              bias,
              ctx._bufs[0],
              offset,
              mask,
              output,
              ctx._bufs[1],
              weight.shape[2],
              weight.shape[3],
              ctx.stride,
              ctx.stride,
              ctx.padding,
              ctx.padding,
              ctx.dilation,
              ctx.dilation,
              ctx.groups,
              ctx.deformable_groups,
              ctx.with_bias,
          )
      elif input.is_cuda and dcn_cuda_ready:
          deform_conv_cuda.modulated_deform_conv_cuda_forward(
              input,
              weight,
              bias,
              ctx._bufs[0],
              offset,
              mask,
              output,
              ctx._bufs[1],
              weight.shape[2],
              weight.shape[3],
              ctx.stride,
              ctx.stride,
              ctx.padding,
              ctx.padding,
              ctx.dilation,
              ctx.dilation,
              ctx.groups,
              ctx.deformable_groups,
              ctx.with_bias,
          )
      else:
          device_ = input.device.type
          raise RuntimeError(
              "Input type is {}, but 'deform_conv_{}.*.so' is not imported successfully.".format(
                  device_, device_
              ),
          )
      return output
  
file_path: EasyOCR/easyocr/DBNet/assets/ops/dcn/functions/deform_conv.py
imports: import os
  import torch
  import warnings
  from torch.autograd import Function
  from torch.nn.modules.utils import _pair
  from torch.utils import cpp_extension
label_desc: Use image node_id 1 for calling the ModulatedDeformConvFunction obj's underlying member method code with example usage: obj.forward(ctx, input, offset, mask, weight, bias, stride, padding, dilation, groups, deformable_groups) and returns: output