import re


def camel_to_snake(camel_str):
    """
        example:
            Convert 'camelToSnake' to 'camel_to_snake'
    """
    p = re.compile(r'([a-z]|\d)([A-Z])')
    sub = re.sub(p, r'\1_\2', camel_str).lower()
    return sub