code: def triu_matvecmul(x, y, transpose=False):
      """
      EXPERIMENTAL Computes matrix-vector product of an upper-triangular
      arrowhead matrix `x` and a vector `y`.
  
      :param TriuArrowhead x: an upper-triangular arrowhead matrix.
      :param torch.Tensor y: a 1D tensor
      :return: matrix-vector product of `x` and `y`
      :rtype: TriuArrowhead
      """
      assert isinstance(x, TriuArrowhead)
      head_size = x.top.size(0)
      if transpose:
          z = x.top.transpose(-2, -1).matmul(y[:head_size])
          # here we exploit the diagonal structure of the bottom right part
          # of arrowhead_sqrt matrix; so the complexity is still O(N)
          top = z[:head_size]
          bottom = z[head_size:] + x.bottom_diag * y[head_size:]
      else:
          top = x.top.matmul(y)
          bottom = x.bottom_diag * y[head_size:]
      return torch.cat([top, bottom], 0)
  
imports: from collections import namedtuple
  import torch
label_desc: Use image node_id 3 for calling a global function with example usage: triu_matvecmul(x, y, transpose) and returns: torch