def from_camel_case(name):
    """Convert camel case to snake case.

    Function and variable names are usually written in camel case in C++ and
    in snake case in Python.
    """
    new_name = str(name)
    i = 0
    while i < len(new_name):
        if new_name[i].isupper() and i > 0:
            new_name = new_name[:i] + "_" + new_name[i:]
            i += 1
        i += 1
    return new_name.lower()