def _str_to_identifier(string):
    'Convert a string to a valid Python identifier.'
    return re.sub('\\W|^(?=\\d)', '_', string)
Convert a string to a valid Python identifier.
def _str_to_identifier(string):
    
    return re.sub('\\W|^(?=\\d)', '_', string)