code: def addAggregators(cols, aggrnames):
      'add aggregator for each aggrname to each of cols'
      for aggrname in aggrnames:
          aggrs = aggregators.get(aggrname)
          aggrs = aggrs if isinstance(aggrs, list) else [aggrs]
          for aggr in aggrs:
              for c in cols:
                  if not hasattr(c, 'aggregators'):
                      c.aggregators = []
                  if aggr and aggr not in c.aggregators:
                      c.aggregators += [aggrf addAggregators(cols, aggrnames):
      'add aggregator for each aggrname to each of cols'
      for aggrname in aggrnames:
          aggrs = aggregators.get(aggrname)
          aggrs = aggrs if isinstance(aggrs, list) else [aggrs]
          for aggr in aggrs:
              for c in cols:
                  if not hasattr(c, 'aggregators'):
                      c.aggregators = []
                  if aggr and aggr not in c.aggregators:
                      c.aggregators += [aggr]
docs: add aggregator for each aggrname to each of cols