class_docstr: A general checkpoint loader to manage all schemes.
class_docstr_tok: ["A","general","checkpoint","loader","to","manage","all","schemes","."]
code: def _register_scheme(cls, prefixes, loader, force=False):
      if isinstance(prefixes, str):
          prefixes = [prefixes]
      else:
          assert isinstance(prefixes, (list, tuple))
      for prefix in prefixes:
          if (prefix not in cls._schemes) or force:
              cls._schemes[prefix] = loader
          else:
              raise KeyError(
                  f"{prefix} is already registered as a loader backend, "
                  'add "force=True" if you want to override it'
              )
      # sort, longer prefixes take priority
      cls._schemes = OrderedDict(
          sorted(cls._schemes.items(), key=lambda t: t[0], reverse=True)
      )
  
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 1 for calling the CheckpointLoader obj's underlying member method code with example usage: obj._register_scheme(cls, prefixes, loader, force) without return types