code: def _load_checkpoint_with_prefix(prefix, filename, map_location=None):
      """Load partial pretrained model with specific prefix.
  
      Args:
          prefix (str): The prefix of sub-module.
          filename (str): Accept local filepath, URL, ``torchvision://xxx``,
              ``open-mmlab://xxx``. Please refer to ``docs/model_zoo.md`` for
              details.
          map_location (str | None): Same as :func:`torch.load`. Default: None.
  
      Returns:
          dict or OrderedDict: The loaded checkpoint.
      """
  
      checkpoint = _load_checkpoint(filename, map_location=map_location)
  
      if "state_dict" in checkpoint:
          state_dict = checkpoint["state_dict"]
      else:
          state_dict = checkpoint
      if not prefix.endswith("."):
          prefix += "."
      prefix_len = len(prefix)
  
      state_dict = {
          k[prefix_len:]: v
          for k, v in state_dict.items()
          if k.startswith(prefix)
      }
  
      assert state_dict, f"{prefix} is not in the pretrained model"
      return state_dict
  
imports: import io
  import os
  import os.path
  import pkgutil
  import re
  import time
  import warnings
  from collections import OrderedDict
  from importlib import import_module
  from tempfile import TemporaryDirectory
  import torch
  import torchvision
  from torch.optim import Optimizer
  from torch.utils import model_zoo
  import annotator.uniformer.mmcv
  from ..fileio import FileClient
  from ..fileio import load
  from ..parallel import is_module_wrapper
  from ..utils import mkdir_or_exist
  from .dist_utils import get_dist_info
label_desc: Use image node_id 16 for calling a global function with example usage: _load_checkpoint_with_prefix(prefix, filename, map_location) and returns: state_dict