code: def load_langs(cls, args, **kwargs):
      if args.lang_dict and args.langs:
          raise ValueError(
              "--langs and --lang-dict can not both be specified"
          )
      if args.lang_dict is None and args.langs is None:
          logger.warning(
              "External language dictionary is not provided; "
              "use lang-pairs to infer the set of supported languages. "
              "The language ordering is not stable which might cause "
              "misalignment in pretraining and finetuning."
          )
          # infer from lang_pairs as it is
          langs = list(
              {
                  x
                  for lang_pair in args.lang_pairs
                  for x in lang_pair.split("-")
              }
          )
          langs = sorted(langs)
          logger.info(f"inferred language list: {langs}")
      elif args.lang_dict:
          with open(
              PathManager.get_local_path(args.lang_dict),
              "r",
              encoding="utf-8",
          ) as f:
              langs = [
                  lang.strip() for lang in f.readlines() if lang.strip()
              ]
              logger.info(
                  f"loaded language list from {args.lang_dict} as they are ordered in file"
              )
      elif args.langs:
          langs = args.langs
          logger.info(
              f"parsed the language list as they are ordered in the option: {langs}"
          )
      return langs
  
imports: import itertools
  import json
  import logging
  import math
  import os
  from collections import OrderedDict, defaultdict
  from argparse import ArgumentError
  from fairseq import utils
  from fairseq.data import AppendTokenDataset, ConcatDataset, Dictionary, LanguagePairDataset, PrependTokenDataset, SampledMultiDataset, SampledMultiEpochDataset, StripTokenDataset, TransformEosLangPairDataset, TruncateDataset, data_utils, indexed_dataset
  from fairseq.data.multilingual.multilingual_utils import EncoderLangtok, LangTokSpec, LangTokStyle, augment_dictionary, get_lang_tok
  from fairseq.data.multilingual.sampled_multi_dataset import CollateFormat
  from fairseq.file_io import PathManager
  from fairseq.utils import FileContentsAction, csv_str_list, eval_str_dict
label_desc: Use image node_id 4 for calling the MultilingualDatasetManager obj's underlying member method code with example usage: obj.load_langs(cls, args) and returns: langs