import re


def normalize_prometheus_label(str):
    """
    Prometheus labels must match /[a-zA-Z_][a-zA-Z0-9_]*/ and so we should coerce our data to it.
    Source: https://prometheus.io/docs/concepts/data_model/
    Every invalid character will be made to be an underscore `_`.
    """
    return re.sub(r'[^[a-zA-Z_][a-zA-Z0-9_]*]',"_",str,0)