code: def find_measurable_cumsums(
      fgraph, node
  ) -> Optional[List[MeasurableCumsum]]:
      r"""Finds `Cumsums`\s for which a `logprob` can be computed."""
  
      if not (isinstance(node.op, CumOp) and node.op.mode == "add"):
          return None  # pragma: no cover
  
      if isinstance(node.op, MeasurableCumsum):
          return None  # pragma: no cover
  
      rv_map_feature: Optional[PreserveRVMappings] = getattr(
          fgraph, "preserve_rv_mappings", None
      )
  
      if rv_map_feature is None:
          return None  # pragma: no cover
  
      base_rv = node.inputs[0]
  
      # Check that cumsum does not mix dimensions
      if base_rv.ndim > 1 and node.op.axis is None:
          return None
  
      if not rv_map_feature.request_measurable(node.inputs):
          return None
  
      new_op = MeasurableCumsum(axis=node.op.axis or 0, mode="add")
      new_rv = new_op.make_node(base_rv).default_output()
  
      return [new_rv]
  
file_path: pymc/pymc/logprob/cumsum.py
imports: from typing import List, Optional
  import pytensor.tensor
  from pytensor.graph.rewriting.basic import node_rewriter
  from pytensor.tensor.extra_ops import CumOp
  from pymc.logprob.abstract import MeasurableVariable, _logprob, _logprob_helper
  from pymc.logprob.rewriting import PreserveRVMappings, measurable_ir_rewrites_db
label_desc: Use image node_id 2 for calling a global function with example usage: find_measurable_cumsums(fgraph, node) and returns: list, None, None, None, None, None