code: def load(load_path: str, overwrite_config=None, rank=0, world_size=1):
      """
      Load task, config and training state from a saved snapshot
      by default, it will construct the task using the saved config then load
      metadata and model state.
  
      if overwrite_task is specified, it will construct the task using
      overwrite_task then load metadata and model state.
      """
      state = _CHECKPOINT_MANAGER.load(load_path)
      return load_checkpoint(state, overwrite_config, rank, world_size)
  
imports: import io
  import logging
  import os
  from typing import Dict, Optional
  import torch
  from pytext.config import config_to_json, pytext_config_from_json, PyTextConfig
  from pytext.data import CommonMetadata
  from pytext.data.tensorizers import Tensorizer
  from pytext.models import Model
  from pytext.trainers.training_state import TrainingState
  from pytext.utils.file_io import PathManager
  from .pytext_checkpoint_management import get_checkpoint_manager
label_desc: Use image node_id 11 for calling a global function with example usage: load(load_path, overwrite_config, rank, world_size) and returns: load_checkpoint