def convert_to_underscore(name):
    """ "someFunctionWhatever" -> "some_function_whatever" """
    s1 = _first_cap_re.sub(r'\1_\2', name)
    return _all_cap_re.sub(r'\1_\2', s1).lower()
"someFunctionWhatever" -> "some_function_whatever"