class_docstr: A `Type` for sparse tensors.
  
  Notes
  -----
  Currently, sparse tensors can only be matrices (i.e. have two dimensions).
class_docstr_tok: ["A","`","Type","`","for","sparse","tensors",".","Notes","--","--","-","Currently",",","sparse","tensors","can","only","be","matrices","(","i.e",".","have","two","dimensions",")","."]
code: def __eq__(self, other):
      res = super().__eq__(other)
  
      if isinstance(res, bool):
          return res and other.format == self.format
  
      return res
  
imports: from collections.abc import Iterable
  from typing import Literal, Optional, Union
  import numpy
  import scipy.sparse
  import pytensor
  from pytensor import scalar
  from pytensor.graph.basic import Variable
  from pytensor.graph.type import HasDataType
  from pytensor.tensor.type import DenseTensorType, TensorType
label_desc: Use image node_id 13 for calling the SparseTensorType obj's underlying member method code with example usage: obj.__eq__(other) and returns: res, unknown