code: def array(
      x, dtype=None, copy=True, order="K", ndmin=None, chunk_size=None
  ):
      """
      Create a tensor.
  
      Parameters
      ----------
      object : array_like
          An array, any object exposing the array interface, an object whose
          __array__ method returns an array, or any (nested) sequence.
      dtype : data-type, optional
          The desired data-type for the array.  If not given, then the type will
          be determined as the minimum type required to hold the objects in the
          sequence.  This argument can only be used to 'upcast' the array.  For
          downcasting, use the .astype(t) method.
      copy : bool, optional
          If true (default), then the object is copied.  Otherwise, a copy will
          only be made if __array__ returns a copy, if obj is a nested sequence,
          or if a copy is needed to satisfy any of the other requirements
          (`dtype`, `order`, etc.).
      order : {'K', 'A', 'C', 'F'}, optional
          Specify the memory layout of the array. If object is not an array, the
          newly created array will be in C order (row major) unless 'F' is
          specified, in which case it will be in Fortran order (column major).
          If object is an array the following holds.
  
          ===== ========= ===================================================
          order  no copy                     copy=True
          ===== ========= ===================================================
          'K'   unchanged F & C order preserved, otherwise most similar order
          'A'   unchanged F order if input is F and not C, otherwise C order
          'C'   C order   C order
          'F'   F order   F order
          ===== ========= ===================================================
  
          When ``copy=False`` and a copy is made for other reasons, the result is
          the same as if ``copy=True``, with some exceptions for `A`, see the
          Notes section. The default order is 'K'.
      ndmin : int, optional
          Specifies the minimum number of dimensions that the resulting
          array should have.  Ones will be prepended to the shape as
          needed to meet this requirement.
      chunk_size: int, tuple, optional
          Specifies chunk size for each dimension.
  
      Returns
      -------
      out : Tensor
          An tensor object satisfying the specified requirements.
  
      See Also
      --------
      empty, empty_like, zeros, zeros_like, ones, ones_like, full, full_like
  
      Examples
      --------
      >>> import mars.tensor as mt
  
      >>> mt.array([1, 2, 3]).execute()
      array([1, 2, 3])
  
      Upcasting:
  
      >>> mt.array([1, 2, 3.0]).execute()
      array([ 1.,  2.,  3.])
  
      More than one dimension:
  
      >>> mt.array([[1, 2], [3, 4]]).execute()
      array([[1, 2],
             [3, 4]])
  
      Minimum dimensions 2:
  
      >>> mt.array([1, 2, 3], ndmin=2).execute()
      array([[1, 2, 3]])
  
      Type provided:
  
      >>> mt.array([1, 2, 3], dtype=complex).execute()
      array([ 1.+0.j,  2.+0.j,  3.+0.j])
  
      """
      raw_x = x
      order = order or "K"
      x = tensor(x, dtype=dtype, order=order, chunk_size=chunk_size)
      while ndmin is not None and x.ndim < ndmin:
          x = x[np.newaxis]
  
      if copy and x is raw_x:
          x = x.copy(order=order)
      elif (
          not copy
          and isinstance(raw_x, TENSOR_TYPE)
          and raw_x.dtype == x.dtype
          and raw_x.order == x.order
          and raw_x.shape == x.shape
          and raw_x is not x
          and hasattr(raw_x, "data")
      ):
          raw_x.data = x.data
  
      return x
  
imports: import numpy
  from ...None import opcodes
  from ...lib.sparse.core import issparse, get_array_module, cp, cps, sps
  from ...lib.sparse import SparseNDArray
  from ...serialization.serializables import FieldTypes, AnyField, NDArrayField, TupleField
  from ...utils import on_serialize_shape, on_deserialize_shape
  from ..core import TENSOR_TYPE, TensorOrder, TensorData, Tensor
  from ..utils import get_chunk_slices
  from ..array_utils import array_module, is_array, is_cupy
  from .core import TensorNoInput
  from .scalar import scalar
label_desc: Use image node_id 3 for calling a global function with example usage: array(x, dtype, copy, order, ndmin, chunk_size) and returns: x