<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def resolve_metric_as_tuple(metric):
 """ Resolve metric key to a given target. :param metric: the metric name. :type metric: ``str`` :rtype: :class:`Metric` """

    if "." in metric:
        _, metric = metric.split(".")

    r = [
        (operator, match) for operator, match in ALL_METRICS if match[0] == metric
    ]
    if not r or len(r) == 0:
        raise ValueError(f"Metric {metric} not recognised.")
    else:
        return r[0]