code: def _compose_convolution_tree(
      dprvs: List[DiscretePRV],
  ) -> DiscretePRV:
      # repeatedly convolve neighbouring PRVs until we only have one left
      while len(dprvs) > 1:
          dprvs_conv = []
          if len(dprvs) % 2 == 1:
              dprvs_conv.append(dprvs.pop())
  
          for dprv_left, dprv_right in zip(dprvs[:-1:2], dprvs[1::2]):
              dprvs_conv.append(_compose_two(dprv_left, dprv_right))
  
          dprvs = dprvs_conv
      return dprvs[0]
  
file_path: opacus/opacus/accountants/analysis/prv/compose.py
imports: from typing import List
  import numpy
  from scipy.fft import irfft, rfft
  from scipy.signal import convolve
  from .prvs import DiscretePRV
label_desc: Use image node_id 3 for calling a global function with example usage: _compose_convolution_tree(dprvs) and returns: dprvs