class_docstr: A general checkpoint loader to manage all schemes.
class_docstr_tok: ["A","general","checkpoint","loader","to","manage","all","schemes","."]
docstr: load checkpoint through URL scheme path.
  
  Args:
      filename (str): checkpoint file name with given prefix
      map_location (str, optional): Same as :func:`torch.load`.
          Default: None
      logger (:mod:`logging.Logger`, optional): The logger for message.
          Default: None
  
  Returns:
      dict or OrderedDict: The loaded checkpoint.
docstr_tok: ["load","checkpoint","through","URL","scheme","path",".","Args",":","filename","(","str",")",":","checkpoint","file","name","with","given","prefix","map_location","(","str",",","optional",")",":","Same","as",":","func",":","`","torch.load","`",".","Default",":","None","logger","(",":","mod",":","`","logging.Logger","`",",","optional",")",":","The","logger","for","message",".","Default",":","None","Returns",":","dict","or","OrderedDict",":","The","loaded","checkpoint","."]
code: def load_checkpoint(cls, filename, map_location=None, logger=None):
      """load checkpoint through URL scheme path.
  
      Args:
          filename (str): checkpoint file name with given prefix
          map_location (str, optional): Same as :func:`torch.load`.
              Default: None
          logger (:mod:`logging.Logger`, optional): The logger for message.
              Default: None
  
      Returns:
          dict or OrderedDict: The loaded checkpoint.
      """
  
      checkpoint_loader = cls._get_checkpoint_loader(filename)
      class_name = checkpoint_loader.__name__
      mmcv.print_log(
          f"load checkpoint from {class_name[10:]} path: {filename}",
          logger,
      )
      return checkpoint_loader(filename, map_location)
  
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 4 for calling the CheckpointLoader obj's underlying member method code with example usage: obj.load_checkpoint(cls, filename, map_location, logger) and returns: checkpoint_loader