class_docstr: Wrap multiple data collator functions together. The input functions will be applied
  to the corresponding input fields.
  
  Each data sample should be a list or tuple containing multiple attributes. The `i`th collate
  function stored in `Tuple` will be applied on the `i`th attribute. For example, each
  data sample is (nd_data, label). You can wrap two collate functions using
  `Tuple(DataCollate, LabelCollate)` to collate nd_data and label correspondingly.
  
  Parameters
  ----------
      fn (list or tuple or callable): The collate functions to wrap.
      *args (tuple of callable, optional): The additional collate functions to wrap.
class_docstr_tok: ["Wrap","multiple","data","collator","functions","together",".","The","input","functions","will","be","applied","to","the","corresponding","input","fields",".","Each","data","sample","should","be","a","list","or","tuple","containing","multiple","attributes",".","The","`","i","`","th","collate","function","stored","in","`","Tuple","`","will","be","applied","on","the","`","i","`","th","attribute",".","For","example",",","each","data","sample","is","(","nd_data",",","label",")",".","You","can","wrap","two","collate","functions","using","`","Tuple","(","DataCollate",",","LabelCollate",")","`","to","collate","nd_data","and","label","correspondingly",".","Parameters","--","--","--","--","--","fn","(","list","or","tuple","or","callable",")",":","The","collate","functions","to","wrap",".","*","args","(","tuple","of","callable",",","optional",")",":","The","additional","collate","functions","to","wrap","."]
docstr: Collate the input data.
  
  Parameters
  ----------
      data (list): The samples to collate. Each sample should contain N attributes.
  
  Returns
  -------
      ret (tuple):
          A tuple of length N. Contains the collated result of each attribute in the input.
docstr_tok: ["Collate","the","input","data",".","Parameters","--","--","--","--","--","data","(","list",")",":","The","samples","to","collate",".","Each","sample","should","contain","N","attributes",".","Returns","--","--","--","-","ret","(","tuple",")",":","A","tuple","of","length","N.","Contains","the","collated","result","of","each","attribute","in","the","input","."]
code: def __call__(self, data):
      """
      Collate the input data.
  
      Parameters
      ----------
          data (list): The samples to collate. Each sample should contain N attributes.
  
      Returns
      -------
          ret (tuple):
              A tuple of length N. Contains the collated result of each attribute in the input.
      """
      if len(data[0]) != len(self._fn):
          raise ValueError(
              f"The number of attributes in each data sample should contains {len(self._fn)} elements"
          )
      ret = []
      for i, ele_fn in enumerate(self._fn):
          ret.append(ele_fn([ele[i] for ele in data]))
      return tuple(ret)
  
file_path: autogluon/multimodal/src/autogluon/multimodal/data/collator.py
imports: import math
  import warnings
  import numpy
  import torch
label_desc: Use image node_id 2 for calling the TupleCollator obj's underlying member method code with example usage: obj.__call__(data) and returns: tuple