code: def _aggregate_func(self, aggregate):
          
          funcs = {"sum": add, "min": min, "max": max}
          func_name = aggregate.lower() if aggregate else 'sum'
          try:
              return funcs[func_name]
          except KeyError:
              raise TypeError("Unsupported aggregate: {}".format(aggregate))
docs: Return a suitable aggregate score function.