code: def optional_data_names(
      cls, train: bool = True, inference: bool = False
  ) -> Tuple[str, ...]:
      if not inference:
          retval = (
              "spembs",
              "durations",
              "pitch",
              "energy",
              "sids",
              "lids",
          )
      else:
          # Inference mode
          retval = (
              "spembs",
              "speech",
              "durations",
              "pitch",
              "energy",
              "sids",
              "lids",
          )
      return retval
  
imports: import argparse
  import logging
  from pathlib import Path
  from typing import Callable, Collection, Dict, List, Optional, Tuple, Union
  import numpy
  import torch
  import yaml
  from typeguard import check_argument_types, check_return_type
  from espnet2.gan_tts.jets import JETS
  from espnet2.gan_tts.joint import JointText2Wav
  from espnet2.gan_tts.vits import VITS
  from espnet2.layers.abs_normalize import AbsNormalize
  from espnet2.layers.global_mvn import GlobalMVN
  from espnet2.tasks.abs_task import AbsTask
  from espnet2.text.phoneme_tokenizer import g2p_choices
  from espnet2.train.class_choices import ClassChoices
  from espnet2.train.collate_fn import CommonCollateFn
  from espnet2.train.preprocessor import CommonPreprocessor
  from espnet2.train.trainer import Trainer
  from espnet2.tts.abs_tts import AbsTTS
  from espnet2.tts.espnet_model import ESPnetTTSModel
  from espnet2.tts.fastspeech import FastSpeech
  from espnet2.tts.fastspeech2 import FastSpeech2
  from espnet2.tts.feats_extract.abs_feats_extract import AbsFeatsExtract
  from espnet2.tts.feats_extract.dio import Dio
  from espnet2.tts.feats_extract.energy import Energy
  from espnet2.tts.feats_extract.linear_spectrogram import LinearSpectrogram
  from espnet2.tts.feats_extract.log_mel_fbank import LogMelFbank
  from espnet2.tts.feats_extract.log_spectrogram import LogSpectrogram
  from espnet2.tts.prodiff import ProDiff
  from espnet2.tts.tacotron2 import Tacotron2
  from espnet2.tts.transformer import Transformer
  from espnet2.tts.utils import ParallelWaveGANPretrainedVocoder
  from espnet2.utils.get_default_kwargs import get_default_kwargs
  from espnet2.utils.griffin_lim import Spectrogram2Waveform
  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 5 for calling the TTSTask obj's underlying member method code with example usage: obj.optional_data_names(cls, train, inference) and returns: retval