@lru_cache(maxsize=<NUM_LIT>)<EOL>def resolve_metric_as_tuple(metric):
if "<STR_LIT:.>" in metric:<EOL><INDENT>_, metric = metric.split("<STR_LIT:.>")<EOL><DEDENT>r = [<EOL>(operator, match) for operator, match in ALL_METRICS if match[<NUM_LIT:0>] == metric<EOL>]<EOL>if not r or len(r) == <NUM_LIT:0>:<EOL><INDENT>raise ValueError(f"<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>return r[<NUM_LIT:0>]<EOL><DEDENT>
Resolve metric key to a given target.

:param metric: the metric name.
:type  metric: ``str``

:rtype: :class:`Metric`