def metric(func: typing.Callable) -> typing.Callable: """Decorator function that should be used within a problem implementation to define metrics as functions. Arguments: func {typing.Callable} -- a function that calculates a metric Returns: typing.Callable -- the decorated function """ func._metric = func.__name__ return func