code: def register_snapshot_loader(version):
      def decorator(fn):
          LOADER_VERSION_MAP[version] = fn
          global LATEST_SERIALIZE_VERSION
          LATEST_SERIALIZE_VERSION = max(
              LATEST_SERIALIZE_VERSION, version
          )
          return fn
  
      return decorator
  
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 1 for calling a global function with example usage: register_snapshot_loader(version) and returns: decorator, fn