code: def logprob_cumsum(op, values, base_rv, **kwargs):
      """Compute the log-likelihood graph for a `Cumsum`."""
      (value,) = values
  
      value_diff = pt.diff(value, axis=op.axis)
      value_diff = pt.concatenate(
          (
              # Take first element of axis and add a broadcastable dimension so
              # that it can be concatenated with the rest of value_diff
              pt.shape_padaxis(
                  pt.take(value, 0, axis=op.axis),
                  axis=op.axis,
              ),
              value_diff,
          ),
          axis=op.axis,
      )
  
      cumsum_logp = _logprob_helper(base_rv, value_diff)
  
      return cumsum_logp
  
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 1 for calling a global function with example usage: logprob_cumsum(op, values, base_rv) and returns: cumsum_logp