def _camelcase_to_underscore(url):
def upper2underscore(text):<EOL><INDENT>for char in text:<EOL><INDENT>if char.islower():<EOL><INDENT>yield char<EOL><DEDENT>else:<EOL><INDENT>yield '<STR_LIT:_>'<EOL>if char.isalpha():<EOL><INDENT>yield char.lower()<EOL><DEDENT><DEDENT><DEDENT><DEDENT>return '<STR_LIT>'.join(upper2underscore(url))<EOL>
Translate camelCase into underscore format.

>>> _camelcase_to_underscore('minutesBetweenSummaries')
'minutes_between_summaries'