class_docstr: Wrap multiple batchify functions to form a function apply each input function on each
  input fields respectively.
  Each data sample should be a list or tuple containing multiple attributes. The `i`th batchify
  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 batchify functions using
  `Wrap(DataBatchify, LabelBatchify)` to batchify nd_data and label correspondingly.
  Parameters
  ----------
  fn : list or tuple or callable
      The batchify functions to wrap.
  *args : tuple of callable
      The additional batchify functions to wrap.
  Examples
  --------
  >>> from gluoncv.data import batchify
  >>> a = ([1, 2, 3, 4], 0)
  >>> b = ([5, 7], 1)
  >>> c = ([1, 2, 3, 4, 5, 6, 7], 0)
  >>> batchify.Tuple(batchify.Pad(), batchify.Stack())([a, b])
  (
   [[1 2 3 4]
    [5 7 0 0]]
   <NDArray 2x4 @cpu(0)>,
   [0. 1.]
   <NDArray 2 @cpu(0)>)
  >>> # Input can also be a list
  >>> batchify.Tuple([batchify.Pad(), batchify.Stack()])([a, b])
  (
   [[1 2 3 4]
    [5 7 0 0]]
   <NDArray 2x4 @cpu(0)>,
   [0. 1.]
   <NDArray 2 @cpu(0)>)
  >>> # Another example
  >>> a = ([1, 2, 3, 4], [5, 6], 1)
  >>> b = ([1, 2], [3, 4, 5, 6], 0)
  >>> c = ([1], [2, 3, 4, 5, 6], 0)
  >>> batchify.Tuple(batchify.Pad(), batchify.Pad(), batchify.Stack())([a, b, c])
  (
   [[1 2 3 4]
    [1 2 0 0]
    [1 0 0 0]]
   <NDArray 3x4 @cpu(0)>,
   [[5 6 0 0 0]
    [3 4 5 6 0]
    [2 3 4 5 6]]
   <NDArray 3x5 @cpu(0)>,
   [1. 0. 0.]
   <NDArray 3 @cpu(0)>)
class_docstr_tok: ["Wrap","multiple","batchify","functions","to","form","a","function","apply","each","input","function","on","each","input","fields","respectively",".","Each","data","sample","should","be","a","list","or","tuple","containing","multiple","attributes",".","The","`","i","`","th","batchify","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","batchify","functions","using","`","Wrap","(","DataBatchify",",","LabelBatchify",")","`","to","batchify","nd_data","and","label","correspondingly",".","Parameters","--","--","--","--","--","fn",":","list","or","tuple","or","callable","The","batchify","functions","to","wrap",".","*","args",":","tuple","of","callable","The","additional","batchify","functions","to","wrap",".","Examples","--","--","--","--",">",">",">","from","gluoncv.data","import","batchify",">",">",">","a","=","(","[","1",",","2",",","3",",","4","]",",","0",")",">",">",">","b","=","(","[","5",",","7","]",",","1",")",">",">",">","c","=","(","[","1",",","2",",","3",",","4",",","5",",","6",",","7","]",",","0",")",">",">",">","batchify.Tuple","(","batchify.Pad","(",")",",","batchify.Stack","(",")",")","(","[","a",",","b","]",")","(","[","[","1","2","3","4","]","[","5","7","0","0","]","]","<","NDArray","2x4","@","cpu","(","0",")",">",",","[","0",".","1",".","]","<","NDArray","2","@","cpu","(","0",")",">",")",">",">",">","#","Input","can","also","be","a","list",">",">",">","batchify.Tuple","(","[","batchify.Pad","(",")",",","batchify.Stack","(",")","]",")","(","[","a",",","b","]",")","(","[","[","1","2","3","4","]","[","5","7","0","0","]","]","<","NDArray","2x4","@","cpu","(","0",")",">",",","[","0",".","1",".","]","<","NDArray","2","@","cpu","(","0",")",">",")",">",">",">","#","Another","example",">",">",">","a","=","(","[","1",",","2",",","3",",","4","]",",","[","5",",","6","]",",","1",")",">",">",">","b","=","(","[","1",",","2","]",",","[","3",",","4",",","5",",","6","]",",","0",")",">",">",">","c","=","(","[","1","]",",","[","2",",","3",",","4",",","5",",","6","]",",","0",")",">",">",">","batchify.Tuple","(","batchify.Pad","(",")",",","batchify.Pad","(",")",",","batchify.Stack","(",")",")","(","[","a",",","b",",","c","]",")","(","[","[","1","2","3","4","]","[","1","2","0","0","]","[","1","0","0","0","]","]","<","NDArray","3x4","@","cpu","(","0",")",">",",","[","[","5","6","0","0","0","]","[","3","4","5","6","0","]","[","2","3","4","5","6","]","]","<","NDArray","3x5","@","cpu","(","0",")",">",",","[","1",".","0",".","0",".","]","<","NDArray","3","@","cpu","(","0",")",">",")"]
code: def __init__(self, fn, *args):
      if isinstance(fn, (list, tuple)):
          assert len(args) == 0, (
              "Input pattern not understood. The input of Tuple can be "
              "Tuple(A, B, C) or Tuple([A, B, C]) or Tuple((A, B, C)). "
              "Received fn=%s, args=%s" % (str(fn), str(args))
          )
          self._fn = fn
      else:
          self._fn = (fn,) + args
      for i, ele_fn in enumerate(self._fn):
          assert hasattr(ele_fn, "__call__"), (
              "Batchify functions must be callable! "
              "type(fn[%d]) = %s" % (i, str(type(ele_fn)))
          )
  
imports: import logging
  import numpy
  import mxnet
label_desc: Use image node_id 1 to create a new Tuple object from inherited base classes: object with example: obj = Tuple(fn)