code: def __init__(
      self,
      dim,
      num_heads=6,
      n_points=4,
      n_levels=1,
      deform_ratio=1.0,
      with_cffn=True,
      cffn_ratio=0.25,
      drop=0.0,
      drop_path=0.0,
      norm_layer=partial(nn.LayerNorm, eps=1e-6),
      with_cp=False,
  ):
      super().__init__()
      self.query_norm = norm_layer(dim)
      self.feat_norm = norm_layer(dim)
      self.attn = MSDeformAttn(
          d_model=dim,
          n_levels=n_levels,
          n_heads=num_heads,
          n_points=n_points,
          ratio=deform_ratio,
      )
      self.with_cffn = with_cffn
      self.with_cp = with_cp
      if with_cffn:
          self.ffn = ConvFFN(
              in_features=dim,
              hidden_features=int(dim * cffn_ratio),
              drop=drop,
          )
          self.ffn_norm = norm_layer(dim)
          self.drop_path = (
              DropPath(drop_path) if drop_path > 0.0 else nn.Identity()
          )
  
imports: from functools import partial
  import torch
  import torch.nn
  import torch.utils.checkpoint
  from ...ops.modules import MSDeformAttn
  from .drop_path import DropPath
label_desc: Use image node_id 1 to create a new Extractor object from inherited base classes: nn with example: obj = Extractor(dim, num_heads, n_points, n_levels, deform_ratio, with_cffn, cffn_ratio, drop, drop_path, norm_layer, with_cp)