code: def hstack(tup, *, dtype=None, casting="same_kind"):
      """Stacks arrays horizontally.
  
      If an input array has one dimension, then the array is treated as a
      horizontal vector and stacked along the first axis. Otherwise, the array is
      stacked along the second axis.
  
      Args:
          tup (sequence of arrays): Arrays to be stacked.
          dtype (str or dtype): If provided, the destination array will have this
              dtype.
          casting ({‘no’, ‘equiv’, ‘safe’, ‘same_kind’, ‘unsafe’}, optional):
              Controls what kind of data casting may occur. Defaults to
              ``'same_kind'``.
  
      Returns:
          cupy.ndarray: Stacked array.
  
      .. seealso:: :func:`numpy.hstack`
  
      """
      arrs = [cupy.atleast_1d(a) for a in tup]
      axis = 1
      if arrs[0].ndim == 1:
          axis = 0
      return concatenate(arrs, axis, dtype=dtype, casting=casting)
  
imports: import cupy
  from cupy import _core
label_desc: Use image node_id 4 for calling a global function with example usage: hstack(tup) and returns: concatenate