code: def test_local_csm_properties_csm():
      data = tensor.vector()
      indices, indptr, shape = (
          tensor.ivector(),
          tensor.ivector(),
          tensor.ivector(),
      )
      mode = theano.compile.mode.get_default_mode()
      mode = mode.including("specialize", "local_csm_properties_csm")
      for CS, cast in [
          (sparse.CSC, sp.csc_matrix),
          (sparse.CSR, sp.csr_matrix),
      ]:
          f = theano.function(
              [data, indices, indptr, shape],
              sparse.csm_properties(CS(data, indices, indptr, shape)),
              mode=mode,
          )
          assert not any(
              isinstance(node.op, (sparse.CSM, sparse.CSMProperties))
              for node in f.maker.fgraph.toposort()
          )
          v = cast(random_lil((10, 40), config.floatX, 3))
          f(v.data, v.indices, v.indptr, v.shape)
  
file_path: Theano/theano/sparse/tests/test_opt.py
imports: from __future__ import absolute_import, print_function, division
  from nose.plugins.skip import SkipTest
  import numpy
  import theano
  from theano import sparse, config, tensor
  from theano.sparse import enable_sparse
  from theano.tests import unittest_tools
  from theano.sparse.tests.test_basic import random_lil
label_desc: Use image node_id 1 for calling a global function with example usage: test_local_csm_properties_csm() without return types