(status)
return formatted_status
Try to normalize the HAProxy status as one of the statuses defined in `ALL_STATUSES`,
        if it can't be matched return the status as-is in a tag-friendly format
        ex: 'UP 1/2' -> 'up'
            'no check' -> 'no_check'
Try to normalize the HAProxy status as one of the statuses defined in `ALL_STATUSES`,
        if it can't be matched return the status as-is in a tag-friendly format
        ex: 'UP 1/2' -> 'up'
            'no check' -> 'no_check'
Try to normalize the HAProxy status as one of the statuses defined in ALL_STATUSES if it can t be matched return the status as - is in a tag - friendly format ex : UP 1 / 2 - > up no check - > no_check
def _normalize_status(status):
        """
        Try to normalize the HAProxy status as one of the statuses defined in `ALL_STATUSES`,
        if it can't be matched return the status as-is in a tag-friendly format
        ex: 'UP 1/2' -> 'up'
            'no check' -> 'no_check'
        """
        formatted_status = status.lower().replace(" ", "_")
        for normalized_status in Services.ALL_STATUSES:
            if formatted_status.startswith(normalized_status):
                return normalized_status
        return formatted_status
def _normalize_status ( status ) : formatted_status = status . lower ( ) . replace ( " " , "_" ) for normalized_status in Services . ALL_STATUSES : if formatted_status . startswith ( normalized_status ) : return normalized_status return formatted_status