def _get_metric_value(metrics, metric_name, sample_name, labels):
    """Get value for sample of a metric"""
    for metric in metrics:
        if metric.name == metric_name:
            for sample in metric.samples:
                if sample.name == sample_name and sample.labels == labels:
                    return sample.value
    return None