def rebase_local_aggregate_output(expr, offset):
    assert isinstance(expr, Expression)

    def convert(n):
        if isinstance(n, LocalAggregateOutput):
            return UnnamedAttributeRef(n.index + offset)
        n.apply(convert)
        return n
    return convert(expr)
Cleanup function.
dataset/ETHPy150Open uwescience/raco/raco/expression/aggregate.py/rebase_local_aggregate_output--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/PerfKitBenchmarker/perfkitbenchmarker/linux_benchmarks/cloudsuite_web_serving_benchmark.py/Cleanup