def METHOD_NAME(namespace, metric, name=None, set_global=False):
    """
    Set the namespace, getting the metric name if none given, and return the metric
    """
    if name is None:
        name = metric.__name__
    if set_global:
        global supported
        setattr(supported, name, metric)
    setattr(namespace, name, metric)
    return metric