def get_sample_value(self, name, labels=None):
        if labels is None:
            labels = {}
        for metric in self.collect():
            for n, l, value in metric.samples:
                if n == name and l == labels:
                    return value
        return None
Returns the sample value, or None if not found.
dataset/ETHPy150Open prometheus/client_python/prometheus_client/core.py/CollectorRegistry.get_sample_value