code: def default_extra_state(args) -> Dict[str, Any]:
      return {
          "epoch": 1,
          "batch_offset": 0,
          "start_time": time.time(),
          "previous_training_time": 0.0,
          "tune_eval": {
              "loss": None,
              "perplexity": None,
              "lowest_loss": None,
              "num_since_best": 0,
          },
          # The list of checkpoint files is actually managed by the
          # CheckpointManager, which overwrites this placeholder when it saves
          # checkpoints.
          "checkpoint_files": [],
          "training_progress": [],
      }
  
imports: import builtins
  import collections
  import datetime
  import faulthandler
  import math
  import multiprocessing.queues
  import os
  import queue
  import random
  import time
  from typing import Any, Callable, Dict, Optional, Tuple
  import numpy
  import torch
  from fairseq import data, distributed_utils, options, progress_bar, tasks, utils
  from fairseq.meters import AverageMeter, StopwatchMeter
  from fairseq.trainer import Trainer
  from pytorch_translate import char_aware_hybrid, char_source_hybrid, checkpoint, constants, evals, hybrid_transformer_rnn, multi_model, options, preprocess, sequence_criterions, transformer, transformer_aan, weighted_criterions
  from pytorch_translate.data import dictionary
  from pytorch_translate.dual_learning import dual_learning_criterion, dual_learning_task
  from pytorch_translate.file_io import PathManager
  from pytorch_translate.research.deliberation_networks import deliberation_networks
  from pytorch_translate.research.knowledge_distillation import dual_decoder_kd_loss, dual_decoder_kd_model, hybrid_dual_decoder_kd_model, knowledge_distillation_loss
  from pytorch_translate.research.rescore import cloze_transformer_model, rescoring_criterion
  from pytorch_translate.word_prediction import word_prediction_criterion, word_prediction_model
  from pytorch_translate import char_source_model, char_source_transformer_model, rnn, semi_supervised
label_desc: Use image node_id 2 for calling a global function with example usage: default_extra_state(args) and returns: dict