code: def fromdense(a, missing=None):
      a = tensor(a)
      if a.issparse():
          return a
  
      op = DenseToSparse(dtype=a.dtype, gpu=a.op.gpu, missing=missing)
      return op(a)
  
file_path: mars/mars/tensor/datasource/from_dense.py
imports: from collections.abc import Iterable
  from functools import reduce
  from operator import and_
  import numpy
  import pandas
  from ...None import opcodes
  from ...serialization.serializables import KeyField, AnyField
  from ...lib.sparse import SparseNDArray
  from ...lib.sparse.core import naked, cps, sps
  from .core import TensorHasInput
  from .array import tensor
label_desc: Use image node_id 1 for calling a global function with example usage: fromdense(a, missing) and returns: op, a