class_docstr: Wrap multiple collate functions together and apply it to merge inputs from a dict.
  
  The generated batch samples are stored as a dict with the same keywords.
  
  Each data sample should be a dict and the fn corresponds to `key` will be applied on the
  input with the keyword `key`.
  For example, each data sample is {'data': nd_data, 'label': nd_label}.
  You can merge the data and labels using
  `Dict({'data': DataCollate, 'label': LabelCollate})` to collate the nd_data and nd_label.
  
  Parameters
  ----------
      fn_dict (dict): A dictionary that contains the key-->collate function mapping.
class_docstr_tok: ["Wrap","multiple","collate","functions","together","and","apply","it","to","merge","inputs","from","a","dict",".","The","generated","batch","samples","are","stored","as","a","dict","with","the","same","keywords",".","Each","data","sample","should","be","a","dict","and","the","fn","corresponds","to","`","key","`","will","be","applied","on","the","input","with","the","keyword","`","key","`",".","For","example",",","each","data","sample","is","{","'data","'",":","nd_data",",","'label","'",":","nd_label","}",".","You","can","merge","the","data","and","labels","using","`","Dict","(","{","'data","'",":","DataCollate",",","'label","'",":","LabelCollate","}",")","`","to","collate","the","nd_data","and","nd_label",".","Parameters","--","--","--","--","--","fn_dict","(","dict",")",":","A","dictionary","that","contains","the","key","--",">","collate","function","mapping","."]
docstr: Parameters
  ----------
      data (dict): The samples to collate. Each sample should be a dictionary
  
  Returns
  -------
      ret (dict): The resulting dictionary that stores the merged samples.
docstr_tok: ["Parameters","--","--","--","--","--","data","(","dict",")",":","The","samples","to","collate",".","Each","sample","should","be","a","dictionary","Returns","--","--","--","-","ret","(","dict",")",":","The","resulting","dictionary","that","stores","the","merged","samples","."]
code: def __call__(self, data):
      """
  
      Parameters
      ----------
          data (dict): The samples to collate. Each sample should be a dictionary
  
      Returns
      -------
          ret (dict): The resulting dictionary that stores the merged samples.
      """
      ret = dict()
      for k, ele_fn in self._fn_dict.items():
          ret[k] = ele_fn([ele[k] for ele in data])
      return 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 DictCollator obj's underlying member method code with example usage: obj.__call__(data) and returns: ret