<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_module_name(module: types.ModuleType) -> str: """ Returns the name of the specified module by looking up its name in multiple ways to prevent incompatibility issues. :param module: A module object for which to retrieve the name. """

    try:
        return module.__spec__.name
    except AttributeError:
        return module.__name__