code: def execute(cls, ctx, op):
      out = op.outputs[0]
      in_data = naked(ctx[op.inputs[0].key])
      missing = op.missing
      shape = (
          in_data.shape
          if any(np.isnan(s) for s in out.shape)
          else out.shape
      )
  
      xps = cps if op.gpu else sps
      if missing is None:
          ctx[out.key] = SparseNDArray(
              xps.csr_matrix(in_data), shape=shape
          )
      else:
          mask = cls._get_mask(in_data, missing)
          spmatrix = xps.csr_matrix(
              (in_data[mask], mask.nonzero()), shape=shape
          )
          ctx[out.key] = SparseNDArray(spmatrix)
  
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 4 for calling the DenseToSparse obj's underlying member method code with example usage: obj.execute(cls, ctx, op) without return types