code: def load_checkpoint(
      state, overwrite_config=None, rank=0, world_size=1
  ):
      print(f"Loaded checkpoint...")
      if SERIALIZE_VERSION_KEY not in state:
          return load_v1(state)
      else:
          return LOADER_VERSION_MAP[state[SERIALIZE_VERSION_KEY]](
              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 5 for calling a global function with example usage: load_checkpoint(state, overwrite_config, rank, world_size) and returns: load_v1, LOADER_VERSION_MAP