code: def load_url_dist(url, model_dir=None):
      """In distributed setting, this function only download checkpoint at local
      rank 0."""
      rank, world_size = get_dist_info()
      rank = int(os.environ.get("LOCAL_RANK", rank))
      if rank == 0:
          checkpoint = model_zoo.load_url(url, model_dir=model_dir)
      if world_size > 1:
          torch.distributed.barrier()
          if rank > 0:
              checkpoint = model_zoo.load_url(url, model_dir=model_dir)
      return checkpoint
  
imports: import io
  import os
  import os.path
  import pkgutil
  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
  from torch.nn import functional
  import annotator.uniformer.mmcv
  from annotator.uniformer.mmcv.fileio import FileClient
  from annotator.uniformer.mmcv.fileio import load
  from annotator.uniformer.mmcv.parallel import is_module_wrapper
  from annotator.uniformer.mmcv.utils import mkdir_or_exist
  from annotator.uniformer.mmcv.runner import get_dist_info
label_desc: Use image node_id 3 for calling a global function with example usage: load_url_dist(url, model_dir) and returns: checkpoint