import re


def camel_case_to_underscore(name):
    """Converts camel case names to underscore lower case."""
    return re.sub(
        '([a-z])([A-Z])',
        lambda m: m.group(1) + '_' + m.group(2).lower(),
        name)