code: def _to_cfgnode_list(
      cfg: ConfigType,
      config_list: list = [],
      father_name: str = "MODEL",
  ) -> tuple:
      """Convert the key and value of mmengine.ConfigDict into a list.
  
      Args:
          cfg (ConfigDict): The detectron2 model config.
          config_list (list): A list contains the key and value of ConfigDict.
              Defaults to [].
          father_name (str): The father name add before the key.
              Defaults to "MODEL".
  
      Returns:
          tuple:
  
          - config_list: A list contains the key and value of ConfigDict.
          - father_name (str): The father name add before the key.
            Defaults to "MODEL".
      """
      for key, value in cfg.items():
          name = f"{father_name}.{key.upper()}"
          if isinstance(value, ConfigDict) or isinstance(value, dict):
              config_list, fater_name = _to_cfgnode_list(
                  value, config_list, name
              )
          else:
              config_list.append(name)
              config_list.append(value)
  
      return config_list, father_name
  
imports: from typing import Union
  from mmengine.config import ConfigDict
  from mmengine.structures import InstanceData
  from torch import Tensor
  from mmdet.registry import MODELS
  from mmdet.structures import SampleList
  from mmdet.structures.bbox import BaseBoxes
  from mmdet.structures.mask import BitmapMasks, PolygonMasks
  from mmdet.utils import ConfigType
  from .base import BaseDetector
label_desc: Use image node_id 1 for calling a global function with example usage: _to_cfgnode_list(cfg, config_list, father_name) and returns: config_list,  father_name