import string


def camel_to_underscore(name):
    """ convert a camel case string to snake case
    """
    for char in string.ascii_uppercase:
        name = name.replace(char, '_{0}'.format(char))
    return name.lower()