code: def cumsum_using_matvec(input_tensor):
      """Computes cumsum using matrix algebra."""
      dtype = input_tensor.dtype
      axis_length = tf.shape(input_tensor)[-1]
      ones = tf.ones([axis_length, axis_length], dtype=dtype)
      lower_triangular = tf.linalg.band_part(ones, -1, 0)
      cumsum = tf.linalg.matvec(lower_triangular, input_tensor)
      return cumsum
  
file_path: tf-quant-finance/tf_quant_finance/models/utils.py
imports: import tensorflow.compat.v2
  from tf_quant_finance.math import random_ops
label_desc: Use image node_id 7 for calling a global function with example usage: cumsum_using_matvec(input_tensor) and returns: cumsum