<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 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