code: def setup_task(cls, args, **kwargs):
      args.left_pad_source = options.eval_bool(args.left_pad_source)
  
      assert not pytorch_translate_data.is_multilingual(
          args
      ), "Must set `--task pytorch_translate_multilingual` for multilingual training"
  
      # Load dictionaries
      source_dict = pytorch_translate_dictionary.Dictionary.load(
          args.source_vocab_file
      )
      target_dict = pytorch_translate_dictionary.Dictionary.load(
          args.target_vocab_file
      )
  
      source_lang = args.source_lang or "src"
      target_lang = args.target_lang or "tgt"
  
      print(f"| [{source_lang}] dictionary: {len(source_dict)} types")
      print(f"| [{target_lang}] dictionary: {len(target_dict)} types")
  
      use_char_source = (args.char_source_vocab_file != "") or (
          getattr(args, "arch", "") in constants.ARCHS_FOR_CHAR_SOURCE
      )
      if use_char_source:
          char_source_dict = (
              pytorch_translate_dictionary.Dictionary.load(
                  args.char_source_vocab_file
              )
          )
          # this attribute is used for CharSourceModel construction
          args.char_source_dict_size = len(char_source_dict)
      else:
          char_source_dict = None
  
      use_char_target = (
          getattr(args, "char_target_vocab_file", "") != ""
      ) or (
          getattr(args, "arch", "") in constants.ARCHS_FOR_CHAR_TARGET
      )
      if use_char_target:
          char_target_dict = (
              pytorch_translate_dictionary.Dictionary.load(
                  args.char_target_vocab_file
              )
          )
          args.char_target_dict_size = len(char_target_dict)
      else:
          char_target_dict = None
  
      return cls(
          args,
          src_dict=source_dict,
          tgt_dict=target_dict,
          char_source_dict=char_source_dict,
          char_target_dict=char_target_dict,
      )
  
imports: import os
  from collections import OrderedDict
  from typing import Dict, List, Optional, Tuple
  import numpy
  from fairseq import data, options
  from fairseq.data import ConcatDataset, LanguagePairDataset, NoisingDataset
  from fairseq.data.multi_corpus_sampled_dataset import MultiCorpusSampledDataset
  from fairseq.data.noising import UnsupervisedMTNoising
  from fairseq.tasks import LegacyFairseqTask, register_task
  from pytorch_translate import constants, utils
  from pytorch_translate.data import char_data, data, dictionary, utils, weighted_data
  from pytorch_translate.data.language_pair_upsampling_dataset import LanguagePairUpsamplingDataset
  from pytorch_translate.research.multisource import multisource_data
label_desc: Use image node_id 4 for calling the PytorchTranslateTask obj's underlying member method code with example usage: obj.setup_task(cls, args) and returns: cls