code: def is_sparse_or_dense(x):
      if issparse(x):
          return True
      m = get_array_module(x)
      if m.isscalar(x):
          return True
      return isinstance(x, m.ndarray)
  
file_path: mars/mars/lib/sparse/core.py
imports: import numpy
  from ...utils import lazy_import
label_desc: Use image node_id 2 for calling a global function with example usage: is_sparse_or_dense(x) and returns: isinstance, True, True