def handle_fdid_aliases(module_or_package_name, import_alias_mapping):
    """Returns either None or the handled alias.
    Used in add_module.
    fdid means from directory import directory.
    """
    for key, val in import_alias_mapping.items():
        if module_or_package_name == val:
            return key
    return None
def handle_fdid_aliases ( module_or_package_name , import_alias_mapping ) : for key , val in import_alias_mapping . items ( ) : if module_or_package_name == val : return key return None
Returns either None or the handled alias.
    Used in add_module.
    fdid means from directory import directory.