def metric_fn(cls, cast_strategy):

    def fn(label=0, **kwargs):
        metric = cls(label=label, cast_strategy=cast_strategy, **kwargs)
        metric.__name__ = ('%s_%s' % (cast_strategy.__name__, cls.__name__))
        return metric
    return fn
def metric_fn(cls, cast_strategy):

    def fn(label=0, **kwargs):
        metric = cls(label=label, cast_strategy=cast_strategy, **kwargs)
        metric.__name__ = ('%s_%s' % (cast_strategy.__name__, cls.__name__))
        return metric
    return fn