code: def main(argv: Sequence[str]) -> None:
      if len(argv) > 1:
          raise app.UsageError("Too many command-line arguments.")
  
      ##
      # Pick the model and datasets
      # TODO(lit-dev): add remaining GLUE tasks? These three cover all the major
      # features (single segment, two segment, classification, regression).
      if _TASK.value == "sst2":
          train_data = glue.SST2Data("train")
          val_data = glue.SST2Data("validation")
          model = glue_models.SST2Model(_ENCODER_NAME.value)
      elif _TASK.value == "mnli":
          train_data = glue.MNLIData("train")
          val_data = glue.MNLIData("validation_matched")
          model = glue_models.MNLIModel(_ENCODER_NAME.value)
      elif _TASK.value == "stsb":
          train_data = glue.STSBData("train")
          val_data = glue.STSBData("validation")
          model = glue_models.STSBModel(_ENCODER_NAME.value)
      elif _TASK.value == "toxicity":
          train_data = classification.ToxicityData("train")
          val_data = classification.ToxicityData("test")
          model = glue_models.ToxicityModel(_ENCODER_NAME.value)
      else:
          raise ValueError(f"Unrecognized task name: '{_TASK.value:s}'")
  
      ##
      # Run training and save model.
      train_and_save(
          model,
          train_data,
          val_data,
          _TRAIN_PATH.value,
          save_intermediates=_SAVE_INTERMEDIATES.value,
          num_epochs=_NUM_EPOCHS.value,
      )
  
file_path: lit/lit_nlp/examples/tools/glue_trainer.py
imports: from collections.abc import Sequence
  import os
  from absl import app
  from absl import flags
  from absl import logging
  from lit_nlp.examples.datasets import classification
  from lit_nlp.examples.datasets import glue
  from lit_nlp.examples.models import glue_models
  from lit_nlp.lib import serialize
  import tensorflow
label_desc: Use image node_id 3 for calling a global function with example usage: main(argv) without return types