code: def __init__(
      self, embed_dim=256, num_levels=4, num_heads=8, num_points=4
  ):
      super().__init__()
      if embed_dim % num_heads != 0:
          raise ValueError(
              "`embed_dim` must be divisible by `num_heads`, but got {} and {}".format(
                  embed_dim, num_heads
              )
          )
  
      self.im2col_step = 128
  
      self.embed_dim = embed_dim
      self.num_levels = num_levels
      self.num_heads = num_heads
      self.num_points = num_points
  
      self.sampling_offsets = nn.Linear(
          embed_dim, num_heads * num_levels * num_points * 2
      )
      self.attention_weights = nn.Linear(
          embed_dim, num_heads * num_levels * num_points
      )
      self.value_proj = nn.Linear(embed_dim, embed_dim)
      self.output_proj = nn.Linear(embed_dim, embed_dim)
  
      self.init_weight()
  
imports: from __future__ import absolute_import
  from __future__ import print_function
  from __future__ import division
  import math
  import paddle
  import paddle.nn
  import paddle.nn.functional
  from paddleseg.cvlibs import param_init
  from paddlepanseg.models.param_init import THLinearInitMixin
  from paddlepanseg.utils import use_custom_op
label_desc: Use image node_id 1 to create a new MSDeformAttn object from inherited base classes: nn, THLinearInitMixin with example: obj = MSDeformAttn(embed_dim, num_levels, num_heads, num_points)