class_docstr: Data consisting of multiple aligned parts.
  
  Args:
      hparams (dict): Hyperparameters. See :meth:`default_hparams` for the
          defaults.
  
  The processor can read any number of parallel fields as specified in
  the "datasets" list of :attr:`hparams`, and result in a TF Dataset whose
  element is a python `dict` containing data fields from each of the
  specified datasets. Fields from a text dataset or TFRecord dataset have
  names prefixed by its "data_name". Fields from a scalar dataset are
  specified by its "data_name".
  
  Example:
  
      .. code-block:: python
  
          hparams={
              'datasets': [
                  {'files': 'a.txt', 'vocab_file': 'v.a', 'data_name': 'x'},
                  {'files': 'b.txt', 'vocab_file': 'v.b', 'data_name': 'y'},
                  {'files': 'c.txt', 'data_type': 'int', 'data_name': 'z'}
              ]
              'batch_size': 1
          }
          data = MultiAlignedData(hparams)
          iterator = DataIterator(data)
          batch = iterator.get_next()
  
          iterator.switch_to_dataset(sess) # initializes the dataset
          batch_ = sess.run(batch)
          # batch_ == {
          #    'x_text': [['<BOS>', 'x', 'sequence', '<EOS>']],
          #    'x_text_ids': [['1', '5', '10', '2']],
          #    'x_length': [4]
          #    'y_text': [['<BOS>', 'y', 'sequence', '1', '<EOS>']],
          #    'y_text_ids': [['1', '6', '10', '20', '2']],
          #    'y_length': [5],
          #    'z': [1000],
          # }
          ...
  
          hparams={
              'datasets': [
                  {'files': 'd.txt', 'vocab_file': 'v.d', 'data_name': 'm'},
                  {
                      'files': 'd.tfrecord',
                      'data_type': 'tf_record',
                      "feature_original_types": {
                          'image': ['tf.string', 'FixedLenFeature']
                      },
                      'image_options': {
                          'image_feature_name': 'image',
                          'resize_height': 512,
                          'resize_width': 512,
                      },
                      'data_name': 't',
                  }
              ]
              'batch_size': 1
          }
          data = MultiAlignedData(hparams)
          iterator = DataIterator(data)
          batch = iterator.get_next()
  
          iterator.switch_to_dataset(sess) # initializes the dataset
          batch_ = sess.run(batch)
          # batch_ == {
          #    'x_text': [['<BOS>', 'NewYork', 'City', 'Map', '<EOS>']],
          #    'x_text_ids': [['1', '100', '80', '65', '2']],
          #    'x_length': [5],
          #
          #    # "t_image" is a list of a "numpy.ndarray" image
          #    # in this example. Its width equals to 512 and
          #    # its height equals to 512.
          #    't_image': [...]
          # }
class_docstr_tok: ["Data","consisting","of","multiple","aligned","parts",".","Args",":","hparams","(","dict",")",":","Hyperparameters",".","See",":","meth",":","`","default_hparams","`","for","the","defaults",".","The","processor","can","read","any","number","of","parallel","fields","as","specified","in","the","``","datasets","''","list","of",":","attr",":","`","hparams","`",",","and","result","in","a","TF","Dataset","whose","element","is","a","python","`","dict","`","containing","data","fields","from","each","of","the","specified","datasets",".","Fields","from","a","text","dataset","or","TFRecord","dataset","have","names","prefixed","by","its","``","data_name","''",".","Fields","from","a","scalar","dataset","are","specified","by","its","``","data_name","''",".","Example",":","..","code-block",":",":","python","hparams=","{","'datasets","'",":","[","{","'files","'",":","'","a.txt","'",",","'vocab_file","'",":","'","v.a","'",",","'data_name","'",":","'","x","'","}",",","{","'files","'",":","'","b.txt","'",",","'vocab_file","'",":","'","v.b","'",",","'data_name","'",":","'","y","'","}",",","{","'files","'",":","'","c.txt","'",",","'data_type","'",":","'int","'",",","'data_name","'",":","'","z","'","}","]","'batch_size","'",":","1","}","data","=","MultiAlignedData","(","hparams",")","iterator","=","DataIterator","(","data",")","batch","=","iterator.get_next","(",")","iterator.switch_to_dataset","(","sess",")","#","initializes","the","dataset","batch_","=","sess.run","(","batch",")","#","batch_","==","{","#","'x_text","'",":","[","[","'","<","BOS",">","'",",","'","x","'",",","'sequence","'",",","'","<","EOS",">","'","]","]",",","#","'x_text_ids","'",":","[","[","'","1","'",",","'","5","'",",","'10","'",",","'","2","'","]","]",",","#","'x_length","'",":","[","4","]","#","'y_text","'",":","[","[","'","<","BOS",">","'",",","'","y","'",",","'sequence","'",",","'","1","'",",","'","<","EOS",">","'","]","]",",","#","'y_text_ids","'",":","[","[","'","1","'",",","'","6","'",",","'10","'",",","'20","'",",","'","2","'","]","]",",","#","'y_length","'",":","[","5","]",",","#","'","z","'",":","[","1000","]",",","#","}","...","hparams=","{","'datasets","'",":","[","{","'files","'",":","'d.txt","'",",","'vocab_file","'",":","'","v.d","'",",","'data_name","'",":","'m","'","}",",","{","'files","'",":","'d.tfrecord","'",",","'data_type","'",":","'tf_record","'",",","``","feature_original_types","''",":","{","'image","'",":","[","'tf.string","'",",","'FixedLenFeature","'","]","}",",","'image_options","'",":","{","'image_feature_name","'",":","'image","'",",","'resize_height","'",":","512",",","'resize_width","'",":","512",",","}",",","'data_name","'",":","'t","'",",","}","]","'batch_size","'",":","1","}","data","=","MultiAlignedData","(","hparams",")","iterator","=","DataIterator","(","data",")","batch","=","iterator.get_next","(",")","iterator.switch_to_dataset","(","sess",")","#","initializes","the","dataset","batch_","=","sess.run","(","batch",")","#","batch_","==","{","#","'x_text","'",":","[","[","'","<","BOS",">","'",",","'NewYork","'",",","'City","'",",","'Map","'",",","'","<","EOS",">","'","]","]",",","#","'x_text_ids","'",":","[","[","'","1","'",",","'100","'",",","'80","'",",","'65","'",",","'","2","'","]","]",",","#","'x_length","'",":","[","5","]",",","#","#","#","``","t_image","''","is","a","list","of","a","``","numpy.ndarray","''","image","#","#","in","this","example",".","Its","width","equals","to","512","and","#","#","its","height","equals","to","512",".","#","'t_image","'",":","[","...","]","#","}"]
docstr: The name of text tensor of text dataset by its name or id. If the
  dataaet is not of text type, returns `None`.
docstr_tok: ["The","name","of","text","tensor","of","text","dataset","by","its","name","or","id",".","If","the","dataaet","is","not","of","text","type",",","returns","`","None","`","."]
code: def text_name(self, name_or_id):
      """The name of text tensor of text dataset by its name or id. If the
      dataaet is not of text type, returns `None`.
      """
      i = self._maybe_name_to_id(name_or_id)
      if not _is_text_data(self._hparams.datasets[i]["data_type"]):
          return None
      name = dsutils._connect_name(
          self._data_spec.name_prefix[i],
          self._data_spec.decoder[i].text_tensor_name,
      )
      return name
  
imports: import copy
  import tensorflow
  from texar.tf.hyperparams import HParams
  from texar.tf.utils import utils
  from texar.tf.utils.dtypes import is_str, is_callable
  from texar.tf.data.data.text_data_base import TextDataBase
  from texar.tf.data.data.scalar_data import ScalarData
  from texar.tf.data.data.tfrecord_data import TFRecordData
  from texar.tf.data.data.mono_text_data import _default_mono_text_dataset_hparams
  from texar.tf.data.data.scalar_data import _default_scalar_dataset_hparams
  from texar.tf.data.data.tfrecord_data import _default_tfrecord_dataset_hparams
  from texar.tf.data.data.mono_text_data import MonoTextData
  from texar.tf.data.data_utils import count_file_lines
  from texar.tf.data.data import dataset_utils
  from texar.tf.data.vocabulary import Vocab, SpecialTokens
  from texar.tf.data.embedding import Embedding
label_desc: Use image node_id 20 for calling the MultiAlignedData obj's underlying member method code with example usage: obj.text_name(name_or_id) and returns: name, None