code: def add_task_arguments(cls, parser: argparse.ArgumentParser):
      group = parser.add_argument_group(description="Task related")
  
      # NOTE(kamo): add_arguments(..., required=True) can't be used
      # to provide --print_config mode. Instead of it, do as
      required = parser.get_default("required")
      required += ["token_list"]
  
      group.add_argument(
          "--token_list",
          type=str_or_none,
          default=None,
          help="A text mapping int-id to token",
      )
      group.add_argument(
          "--init",
          type=lambda x: str_or_none(x.lower()),
          default=None,
          help="The initialization method",
          choices=[
              "chainer",
              "xavier_uniform",
              "xavier_normal",
              "kaiming_uniform",
              "kaiming_normal",
              None,
          ],
      )
  
      group.add_argument(
          "--input_size",
          type=int_or_none,
          default=None,
          help="The number of input dimension of the feature",
      )
  
      group = parser.add_argument_group(
          description="Preprocess related"
      )
      group.add_argument(
          "--use_preprocessor",
          type=str2bool,
          default=True,
          help="Apply preprocessing to data or not",
      )
      group.add_argument(
          "--token_type",
          type=str,
          default="phn",
          choices=["phn"],
          help="The text will be tokenized "
          "in the specified level token",
      )
      group.add_argument(
          "--bpemodel",
          type=str_or_none,
          default=None,
          help="The model file of sentencepiece",
      )
      parser.add_argument(
          "--non_linguistic_symbols",
          type=str_or_none,
          help="non_linguistic_symbols file path",
      )
      group.add_argument(
          "--cleaner",
          type=str_or_none,
          choices=[None, "tacotron", "jaconv", "vietnamese"],
          default=None,
          help="Apply text cleaning",
      )
      group.add_argument(
          "--losses",
          action=NestedDictAction,
          default=[
              {
                  "name": "discriminator_loss",
                  "conf": {},
              },
          ],
          help="The criterions binded with the loss wrappers.",
          # Loss format would be like:
          # losses:
          #   - name: loss1
          #     conf:
          #       weight: 1.0
          #       smoothed: false
          #   - name: loss2
          #     conf:
          #       weight: 0.1
          #       smoothed: false
      )
      group = parser.add_argument_group(description="Task related")
      group.add_argument(
          "--kenlm_path",
          type=str,
          help="path of n-gram kenlm for validation",
      )
  
      parser.add_argument(
          "--int_pad_value",
          type=int,
          default=0,
          help="Integer padding value for real token sequence",
      )
  
      parser.add_argument(
          "--fairseq_checkpoint",
          type=str,
          help="Fairseq checkpoint to initialize model",
      )
  
      for class_choices in cls.class_choices_list:
          # Append --<name> and --<name>_conf.
          # e.g. --encoder and --encoder_conf
          class_choices.add_arguments(group)
  
imports: import argparse
  import logging
  from typing import Callable, Collection, Dict, List, Optional, Tuple
  import numpy
  import torch
  from typeguard import check_argument_types, check_return_type
  from espnet2.asr.frontend.abs_frontend import AbsFrontend
  from espnet2.asr.frontend.default import DefaultFrontend
  from espnet2.asr.frontend.fused import FusedFrontends
  from espnet2.asr.frontend.s3prl import S3prlFrontend
  from espnet2.asr.frontend.windowing import SlidingWindow
  from espnet2.tasks.abs_task import AbsTask, optim_classes
  from espnet2.torch_utils.initialize import initialize
  from espnet2.train.class_choices import ClassChoices
  from espnet2.train.collate_fn import CommonCollateFn
  from espnet2.train.preprocessor import CommonPreprocessor
  from espnet2.train.uasr_trainer import UASRTrainer
  from espnet2.uasr.discriminator.abs_discriminator import AbsDiscriminator
  from espnet2.uasr.discriminator.conv_discriminator import ConvDiscriminator
  from espnet2.uasr.espnet_model import ESPnetUASRModel
  from espnet2.uasr.generator.abs_generator import AbsGenerator
  from espnet2.uasr.generator.conv_generator import ConvGenerator
  from espnet2.uasr.loss.abs_loss import AbsUASRLoss
  from espnet2.uasr.loss.discriminator_loss import UASRDiscriminatorLoss
  from espnet2.uasr.loss.gradient_penalty import UASRGradientPenalty
  from espnet2.uasr.loss.phoneme_diversity_loss import UASRPhonemeDiversityLoss
  from espnet2.uasr.loss.pseudo_label_loss import UASRPseudoLabelLoss
  from espnet2.uasr.loss.smoothness_penalty import UASRSmoothnessPenalty
  from espnet2.uasr.segmenter.abs_segmenter import AbsSegmenter
  from espnet2.uasr.segmenter.join_segmenter import JoinSegmenter
  from espnet2.utils.nested_dict_action import NestedDictAction
  from espnet2.utils.types import int_or_none, str2bool, str_or_none
label_desc: Use image node_id 1 for calling the UASRTask obj's underlying member method code with example usage: obj.add_task_arguments(cls, parser) without return types