<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def enable_global_typechecked_decorator(flag = True, retrospective = True):
 """Enables or disables global typechecking mode via decorators. See flag global_typechecked_decorator. In contrast to setting the flag directly, this function provides a retrospective option. If retrospective is true, this will also affect already imported modules, not only future imports. Does not work if checking_enabled is false. Does not work reliably if checking_enabled has ever been set to false during current run. """

    global global_typechecked_decorator
    global_typechecked_decorator = flag
    if import_hook_enabled:
        _install_import_hook()
    if global_typechecked_decorator and retrospective:
        _catch_up_global_typechecked_decorator()
    return global_typechecked_decorator