code: def get_trainable_parameters(
      self,
      weight_decay: float = 0.0,
      no_decay_bn_filter_bias: bool = False,
      *args,
      **kwargs,
  ) -> Tuple[List, List]:
      # We need to pop the module name. Otherwise, we may pass two
      # variables with the same name to get_trainable_parameters function
      module_name = kwargs.pop("module_name", "")
  
      """Returns a list of trainable parameters"""
      all_params = []
      all_params_lr = []
  
      # encoder parameters
      if (
          hasattr(self.encoder, "enable_layer_wise_lr_decay")
          and self.encoder.enable_layer_wise_lr_decay
      ):
          (
              backbone_param_list,
              backbone_lr_list,
          ) = self.encoder.get_trainable_parameters(
              weight_decay=weight_decay,
              no_decay_bn_filter_bias=no_decay_bn_filter_bias,
              module_name=module_name + "encoder.",
              *args,
              **kwargs,
          )
  
          all_params.extend(backbone_param_list)
  
          # Scale encoder LR, if applicable
          if self.encoder_lr_multiplier != 1.0:
              backbone_lr_list = [
                  (lr * self.encoder_lr_multiplier)
                  for lr in backbone_lr_list
              ]
  
          all_params_lr.extend(backbone_lr_list)
      else:
          backbone_param_list = parameter_list(
              named_parameters=self.encoder.named_parameters,
              weight_decay=weight_decay,
              no_decay_bn_filter_bias=no_decay_bn_filter_bias,
              module_name=module_name + "encoder.",
              *args,
              **kwargs,
          )
  
          all_params.extend(backbone_param_list)
  
          all_params_lr.extend(
              [self.encoder_lr_multiplier] * len(backbone_param_list)
          )
  
      if self.backbone_proj_layers:
          # projection layer parameters
          projection_param_list = parameter_list(
              named_parameters=self.backbone_proj_layers.named_parameters,
              weight_decay=weight_decay,
              no_decay_bn_filter_bias=no_decay_bn_filter_bias,
              module_name=module_name + "backbone_proj_layers.",
              *args,
              **kwargs,
          )
  
          all_params.extend(projection_param_list)
  
          all_params_lr.extend([1.0] * len(projection_param_list))
  
      if self.fpn_proj_layers:
          # projection layer parameters
          fpn_projection_param_list = parameter_list(
              named_parameters=self.fpn_proj_layers.named_parameters,
              weight_decay=weight_decay,
              no_decay_bn_filter_bias=no_decay_bn_filter_bias,
              module_name=module_name + "fpn_proj_layers.",
              *args,
              **kwargs,
          )
  
          all_params.extend(fpn_projection_param_list)
  
          all_params_lr.extend([1.0] * len(fpn_projection_param_list))
  
      if self.extra_layers:
          # extra layer parameters
          extra_layer_param_list = parameter_list(
              named_parameters=self.extra_layers.named_parameters,
              weight_decay=weight_decay,
              no_decay_bn_filter_bias=no_decay_bn_filter_bias,
              module_name=module_name + "extra_layers.",
              *args,
              **kwargs,
          )
  
          all_params.extend(extra_layer_param_list)
  
          all_params_lr.extend([1.0] * len(extra_layer_param_list))
      return all_params, all_params_lr
  
imports: import argparse
  from typing import Any, Dict, List, Optional, Tuple, Union
  import torch
  from torch import Tensor, nn
  from torch.nn import functional
  from torchvision.models.detection.anchor_utils import AnchorGenerator
  from torchvision.models.detection.mask_rcnn import MaskRCNN
  from torchvision.ops import MultiScaleRoIAlign
  from cvnets import parameter_list
  from cvnets.layers import ConvLayer2d, Identity
  from cvnets.models import MODEL_REGISTRY
  from cvnets.models.classification.base_image_encoder import BaseImageEncoder
  from cvnets.models.detection import DetectionPredTuple
  from cvnets.models.detection.base_detection import BaseDetection
  from cvnets.models.detection.utils.rcnn_utils import FastRCNNConvFCHead, FastRCNNPredictor, MaskRCNNHeads, MaskRCNNPredictor, RPNHead
  from utils import logger
label_desc: Use image node_id 4 for calling the MaskRCNNEncoder obj's underlying member method code with example usage: obj.get_trainable_parameters(weight_decay, no_decay_bn_filter_bias) and returns: all_params,  all_params_lr