code: def shakeshake(xs, equal_grad=False):
    
    if len(xs) == 1:
      return xs[0]
    div = (len(xs) + 1) // 2
    arg1 = shakeshake(xs[:div], equal_grad=equal_grad)
    arg2 = shakeshake(xs[div:], equal_grad=equal_grad)
    if equal_grad:
      return shakeshake2_eqgrad(arg1, arg2)
    return shakeshake2(arg1, arg2)
docs: Multi-argument shake-shake, currently approximated by sums of 2.