def METHOD_NAME(cls, source_key, configuration, metrics) -> None:
    """Check that the metrics listed by the source configuration have the source as supported source."""
    for configuration_key, configuration_value in configuration.__root__.items():
        for metric_key in configuration_value.metrics:
            if metric_key not in metrics:
                msg = (
                    f"Configuration {configuration_key} of source {source_key} refers to non-existing metric "
                    f"{metric_key}"
                )
                raise ValueError(msg)
            if source_key not in metrics[metric_key].sources:
                msg = (
                    f"Configuration {configuration_key} of source {source_key} refers to metric {metric_key}, "
                    f"but {metric_key} doesn't list {source_key} as source"
                )
                raise ValueError(msg)