code: def create_model_config(
      backbone: MMDetBackboneConfig,
      pretrained: bool = True,
      checkpoints_path: Optional[Union[str, Path]] = "checkpoints",
      force_download=False,
      cfg_options=None,
  ):
      model_name = backbone.model_name
      config_path = backbone.config_path
      weights_url = backbone.weights_url
  
      # download weights
      weights_path = None
      if pretrained and weights_url:
          save_dir = Path(checkpoints_path) / model_name
          save_dir.mkdir(exist_ok=True, parents=True)
  
          fname = Path(weights_url).name
          weights_path = save_dir / fname
  
          if not weights_path.exists() or force_download:
              download_url(url=weights_url, save_path=str(weights_path))
  
      cfg = Config.fromfile(config_path)
  
      if cfg_options is not None:
          cfg.merge_from_dict(cfg_options)
  
      return cfg, weights_path
  
file_path: icevision/icevision/models/mmdet/utils.py
imports: from numpy import False_
  from icevision.imports import *
  from icevision.utils import *
  from icevision.models.backbone_config import BackboneConfig
  from icevision.models.mmdet.download_configs import download_mmdet_configs
  from mmdet.models.detectors import *
  from mmcv import Config
  from mmdet.models.backbones.ssd_vgg import SSDVGG
  from mmdet.models.backbones.csp_darknet import CSPDarknet
  from mmdet.models.backbones.swin import SwinTransformer
  from mmdet.models.backbones.hourglass import HourglassNet
label_desc: Use image node_id 2 for calling a global function with example usage: create_model_config(backbone, pretrained, checkpoints_path, force_download, cfg_options) and returns: cfg,  weights_path