(self, key)
return ''.join(l if l in string.letters else '_' for l in key)
Replace all non-letter characters with underscores
Replace all non-letter characters with underscores
Replace all non - letter characters with underscores
def key_to_metric(self, key):
        """Replace all non-letter characters with underscores"""
        return ''.join(l if l in string.letters else '_' for l in key)
def key_to_metric ( self , key ) : return '' . join ( l if l in string . letters else '_' for l in key )