code: def test_local_dense_from_sparse_sparse_from_dense():
      mode = get_default_mode()
      mode = mode.including("local_dense_from_sparse_sparse_from_dense")
  
      m = matrix()
      for op in [
          pytensor.sparse.csr_from_dense,
          pytensor.sparse.csc_from_dense,
      ]:
          s = op(m)
          o = pytensor.sparse.dense_from_sparse(s)
          f = pytensor.function([m], o, mode=mode)
          # We should just have a deep copy.
          assert len(f.maker.fgraph.apply_nodes) == 1
          f([[1, 2], [3, 4]])
  
imports: import numpy
  import pytest
  import scipy
  import pytensor
  from pytensor import sparse
  from pytensor.compile.mode import Mode, get_default_mode
  from pytensor.configdefaults import config
  from pytensor.sparse.rewriting import SamplingDotCSR, sd_csc
  from pytensor.tensor.basic import as_tensor_variable
  from pytensor.tensor.math import sum
  from pytensor.tensor.type import ivector, matrix, vector
  from tests import unittest_tools
  from tests.sparse.test_basic import random_lil
label_desc: Use image node_id 7 for calling a global function with example usage: test_local_dense_from_sparse_sparse_from_dense() without return types