code: def _defaggr(name, type, func):
      'Define aggregator `name` that calls func(col, rows)'
      func.type=type
      func.__name__ = name
      return funf _defaggr(name, type, func):
      'Define aggregator `name` that calls func(col, rows)'
      func.type=type
      func.__name__ = name
      return func
docs: Define aggregator `name` that calls func(col, rows)