code: def load_from_pavi(filename, map_location=None):
      """load checkpoint through the file path prefixed with pavi. In distributed
      setting, this function download ckpt at all ranks to different temporary
      directories.
  
      Args:
          filename (str): checkpoint file path with pavi prefix
          map_location (str, optional): Same as :func:`torch.load`.
            Default: None
  
      Returns:
          dict or OrderedDict: The loaded checkpoint.
      """
      assert filename.startswith(
          "pavi://"
      ), f"Expected filename startswith `pavi://`, but get {filename}"
      model_path = filename[7:]
  
      try:
          from pavi import modelcloud
      except ImportError:
          raise ImportError(
              "Please install pavi to load checkpoint from modelcloud."
          )
  
      model = modelcloud.get(model_path)
      with TemporaryDirectory() as tmp_dir:
          downloaded_file = osp.join(tmp_dir, model.name)
          model.download(downloaded_file)
          checkpoint = torch.load(
              downloaded_file, map_location=map_location
          )
      return checkpoint
  
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 10 for calling a global function with example usage: load_from_pavi(filename, map_location) and returns: checkpoint