code: def asfortranarray(a, dtype=None, chunk_size=None):
      """
      Return a tensor (ndim >= 1) laid out in Fortran order in memory.
  
      Parameters
      ----------
      a : array_like
          Input tensor.
      dtype : str or dtype object, optional
          By default, the data-type is inferred from the input data.
      chunk_size: int, tuple, optional
          Specifies chunk size for each dimension.
  
      Returns
      -------
      out : Tensor
          The input `a` in Fortran, or column-major, order.
  
      See Also
      --------
      ascontiguousarray : Convert input to a contiguous (C order) tensor.
  
      Examples
      --------
      >>> import mars.tensor as mt
      >>> x = mt.arange(6).reshape(2,3)
      >>> y = mt.asfortranarray(x)
      >>> x.flags['F_CONTIGUOUS']
      False
      >>> y.flags['F_CONTIGUOUS']
      True
  
      Note: This function returns a tensor with at least one-dimension (1-d)
      so it will not preserve 0-d tensors.
  
      """
      return array(
          a,
          dtype,
          copy=False,
          order="F",
          ndmin=1,
          chunk_size=chunk_size,
      )
  
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 6 for calling a global function with example usage: asfortranarray(a, dtype, chunk_size) and returns: array