code: def _is_sparse(x):
      """
  
      Returns
      -------
      boolean
          True iff x is a L{scipy.sparse.spmatrix} (and not a L{numpy.ndarray}).
  
      """
      if not isinstance(
          x, (scipy.sparse.spmatrix, np.ndarray, tuple, list)
      ):
          raise NotImplementedError(
              "this function should only be called on "
              "sparse.scipy.sparse.spmatrix or "
              "numpy.ndarray, not,",
              x,
          )
      return isinstance(x, scipy.sparse.spmatrix)
  
imports: from __future__ import absolute_import, print_function, division
  import numpy
  import theano
  from theano import gof
  from six import string_types
label_desc: Use image node_id 1 for calling a global function with example usage: _is_sparse(x) and returns: isinstance