def _find_metric(da, dim_metric_list):
    """given a list of dims/coords `dim_metric_list`,
    find the one whos dims match `da`"""
    matches = [m for m in dim_metric_list if m in da.coords]
    if len(matches) > 1:
        raise ValueError(
            "found more than one matching metric(%s), \
                something is wrong with the `metric_list`"
            % matches
        )
    elif len(matches) == 0:
        return None
    else:
        return matches[0]