code: def parse_input_arguments(
      hparams: Dict[str, Any]
  ) -> Tuple[ModelArguments, DataTrainingArguments, TrainingArguments]:
      training_arguments = hparams.get("training_arguments", {})
      parser = HfArgumentParser(
          (ModelArguments, DataTrainingArguments, TrainingArguments)
      )
      if len(sys.argv) == 2 and sys.argv[1].endswith(".json"):
          # If we pass only one argument to the script and it's the path to a json file,
          # let's parse it to get our arguments.
          model_args, data_args, training_args = parser.parse_json_file(
              json_file=os.path.abspath(sys.argv[1])
          )
      else:
          args = sys.argv[1:]
          args.extend(dict2args(training_arguments))
          if any("--deepspeed" == arg.strip() for arg in args):
              args = dsat.get_hf_args_with_overwrites(args, hparams)
          (
              model_args,
              data_args,
              training_args,
          ) = parser.parse_args_into_dataclasses(
              args, look_for_args_file=False
          )
      return model_args, data_args, training_args
  
imports: import logging
  import math
  import os
  import sys
  from dataclasses import dataclass, field
  from itertools import chain
  from typing import Any, Dict, Optional, Tuple
  import datasets
  import evaluate
  import torch
  import transformers
  from datasets import load_dataset
  from torch.utils.tensorboard import SummaryWriter
  from transformers import CONFIG_MAPPING, MODEL_FOR_CAUSAL_LM_MAPPING, AutoConfig, AutoModelForCausalLM, AutoTokenizer, HfArgumentParser, Trainer, TrainingArguments, default_data_collator, is_torch_tpu_available, set_seed
  from transformers.integrations import TensorBoardCallback
  from transformers.testing_utils import CaptureLogger
  from transformers.trainer_utils import get_last_checkpoint
  from transformers.utils import check_min_version, send_example_telemetry
  from transformers.utils.versions import require_version
  import determined
  from determined.pytorch import dsat
  from determined.transformers import DetCallback
label_desc: Use image node_id 2 for calling a global function with example usage: parse_input_arguments(hparams) and returns: model_args,  data_args,  training_args