import re


def realname(module_name):
    """
    Return the real name of a module. The real name of a modules
    is in lower snake_case.
    Transform a CamelCase name into snake_case name.
    """
    reg_first = re.compile(r'(.)([A-Z][a-z]+)')
    reg_all = re.compile(r'([a-z0-9])([A-Z])')
    s1 = reg_first.sub(r'\1_\2', module_name)
    return reg_all.sub(r'\1_\2', s1).lower()