code: def reload_task_for_multi_export(
      config: PyTextConfig, latest_snapshot_path: str
  ):
      assert PathManager.isfile(latest_snapshot_path)
      # reset flags before exporting new model in case changed by prev export
      cuda.CUDA_ENABLED = False
      precision.FP16_ENABLED = False
      if config.use_config_from_snapshot:
          task, _, _ = load(latest_snapshot_path)
      else:
          task, _, _ = load(
              latest_snapshot_path, overwrite_config=config
          )
      print(f"Loaded task from {latest_snapshot_path}!")
      return task
  
imports: import gzip
  import json
  import os
  import sys
  import traceback
  from typing import Any, Dict, get_type_hints, IO, Iterator, List, Optional, Tuple, Union
  import torch
  from pytext.common.constants import Stage
  from pytext.config import ExportConfig, PyTextConfig, TestConfig
  from pytext.config.component import ComponentType, create_component, create_exporter
  from pytext.data.data import Batcher
  from pytext.data.data_handler import CommonMetadata
  from pytext.metric_reporters.channel import Channel
  from pytext.task import create_task, get_latest_checkpoint_path, load, NewTask, save, Task_Deprecated
  from pytext.task.disjoint_multitask import NewDisjointMultitask
  from pytext.trainers import TrainingState
  from pytext.utils import cuda, distributed, precision, round_seq, set_random_seeds, timing
  from pytext.utils.file_io import PathManager
label_desc: Use image node_id 7 for calling a global function with example usage: reload_task_for_multi_export(config, latest_snapshot_path) and returns: task