code: def test_SparseTensorType_convert_variable():
      x = dmatrix(name="x")
      y = sp_matrix("csc", dtype="float64", name="y")
      z = sp_matrix("csr", dtype="float64", name="z")
  
      assert y.type.convert_variable(z) is None
      assert z.type.convert_variable(y) is None
  
      res = y.type.convert_variable(x)
      assert res.type == y.type
  
      res = z.type.convert_variable(x)
      assert res.type == z.type
  
      # TODO FIXME: This is a questionable result, because `x.type` is associated
      # with a dense `Type`, but, since `TensorType` is a base class of `Sparse`,
      # we would need to added sparse/dense logic to `TensorType`, and we don't
      # want to do that.
      assert x.type.convert_variable(y) is y
  
file_path: pytensor/tests/sparse/test_type.py
imports: import pytest
  import scipy
  from pytensor.sparse import matrix
  from pytensor.sparse.type import SparseTensorType
  from pytensor.tensor import dmatrix
label_desc: Use image node_id 3 for calling a global function with example usage: test_SparseTensorType_convert_variable() without return types