code: def empty_like(a, dtype=None, gpu=None, order="K"):
      """
      Return a new tensor with the same shape and type as a given tensor.
  
      Parameters
      ----------
      a : array_like
          The shape and data-type of `a` define these same attributes of the
          returned tensor.
      dtype : data-type, optional
          Overrides the data type of the result.
      gpu : bool, optional
          Allocate the tensor on GPU if True, None as default
      order : {'C', 'F', 'A', or 'K'}, optional
          Overrides the memory layout of the result. 'C' means C-order,
          'F' means F-order, 'A' means 'F' if ``prototype`` is Fortran
          contiguous, 'C' otherwise. 'K' means match the layout of ``prototype``
          as closely as possible.
  
      Returns
      -------
      out : Tensor
          Array of uninitialized (arbitrary) data with the same
          shape and type as `a`.
      See Also
      --------
      ones_like : Return a tensor of ones with shape and type of input.
      zeros_like : Return a tensor of zeros with shape and type of input.
      empty : Return a new uninitialized tensor.
      ones : Return a new tensor setting values to one.
      zeros : Return a new tensor setting values to zero.
      Notes
      -----
      This function does *not* initialize the returned tensor; to do that use
      `zeros_like` or `ones_like` instead.  It may be marginally faster than
      the functions that do set the array values.
      Examples
      --------
      >>> import mars.tensor as mt
      >>> a = ([1,2,3], [4,5,6])                         # a is array-like
      >>> mt.empty_like(a).execute()
      array([[-1073741821, -1073741821,           3],    #ranm
             [          0,           0, -1073741821]])
      >>> a = mt.array([[1., 2., 3.],[4.,5.,6.]])
      >>> mt.empty_like(a).execute()
      array([[ -2.00000715e+000,   1.48219694e-323,  -2.00000572e+000],#random
             [  4.38791518e-305,  -2.00000715e+000,   4.17269252e-309]])
      """
      a = tensor(a)
      tensor_order = get_order(order, a.order)
      gpu = a.op.gpu if gpu is None else gpu
      op = TensorEmptyLike(
          dtype=dtype, gpu=gpu, sparse=a.issparse(), order=order
      )
      return op(a, order=tensor_order)
  
imports: import numpy
  from ...None import opcodes
  from ...serialization.serializables import KeyField, StringField
  from ...lib.sparse import SparseNDArray
  from ...lib.sparse.core import naked, get_array_module, get_sparse_module
  from ..array_utils import create_array
  from ..utils import get_order
  from .core import TensorNoInput, TensorLike
  from .array import tensor
label_desc: Use image node_id 2 for calling a global function with example usage: empty_like(a, dtype, gpu, order) and returns: op