def to_lower_case(name):
    """Returns a lower-case under-score separated format of the supplied name, which is supposed to be camel-case:
    >>> ToScriptName("AbcABC01ABCAbc")
    "abc_abc01abc_abc"
    """
    script_name = ""
    for i in range(len(name)):
        if i > 0 and (name[i-1:i].islower() or name[i-1:i].isdigit() or (i+1 < len(name) and name[i+1:i+2].islower())) and name[i:i+1].isupper():
            script_name += "_"
        script_name += name[i:i+1].lower()
    return script_name