class_docstr: Stack the input data samples to construct the batch.
  
  The N input samples must have the same shape/length and will be stacked to construct a batch.
  
  Parameters
  ----------
  axis
      equivalent to the axis flag in stack(arrs, axis=axis)
  dtype : str or numpy.dtype, default None
      The value type of the output. If it is set to None, the input data type is used.
  
  Examples
  --------
  >>> import codel.data.batchify as bf
  >>> # Stack multiple lists
  >>> a = [1, 2, 3, 4]
  >>> b = [4, 5, 6, 8]
  >>> c = [8, 9, 1, 2]
  >>> bf.Stack()([a, b, c])
  <BLANKLINE>
  [[1 2 3 4]
   [4 5 6 8]
   [8 9 1 2]]
  <NDArray 3x4 @cpu_shared(0)>
  >>> # Stack multiple numpy.ndarrays
  >>> a = np.array([[1, 2, 3, 4], [5, 6, 7, 8]])
  >>> b = np.array([[5, 6, 7, 8], [1, 2, 3, 4]])
  >>> bf.Stack()([a, b])
  <BLANKLINE>
  [[[1 2 3 4]
    [5 6 7 8]]
  <BLANKLINE>
   [[5 6 7 8]
    [1 2 3 4]]]
  <NDArray 2x2x4 @cpu_shared(0)>
  >>> # Stack multiple NDArrays
  >>> a = mx.nd.array([[1, 2, 3, 4], [5, 6, 7, 8]])
  >>> b = mx.nd.array([[5, 6, 7, 8], [1, 2, 3, 4]])
  >>> bf.Stack()([a, b])
  <BLANKLINE>
  [[[1. 2. 3. 4.]
    [5. 6. 7. 8.]]
  <BLANKLINE>
   [[5. 6. 7. 8.]
    [1. 2. 3. 4.]]]
  <NDArray 2x2x4 @cpu_shared(0)>
code: def __init__(self, axis=0, dtype=None):
      self._dtype = to_torch_dtype(dtype)
      self._axis = axis
  
imports: import math
  from typing import AnyStr
  from typing import Callable
  from typing import Dict
  from typing import List
  from typing import NamedTuple
  from typing import Tuple
  from typing import Union
  import numpy
  import torch
  from ..utils import to_torch_dtype
label_desc: Use image node_id 1 to create a new Stack object  with example: obj = Stack(axis, dtype)