<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def reload_module( module: typing.Union[str, types.ModuleType], recursive: bool, force: bool ) -> bool: """ Reloads the specified module, which can either be a module object or a string name of a module. Will not reload a module that has not been imported :param module: A module object or string module name that should be refreshed if its currently loaded version is out of date or the action is forced. :param recursive: When true, any imported sub-modules of this module will also be refreshed if they have been updated. :param force: When true, all modules will be refreshed even if it doesn't appear that they have been updated. :return: """


    if isinstance(module, str):
        module = get_module(module)

    if module is None or not isinstance(module, types.ModuleType):
        return False

    try:
        step = session.project.get_internal_project().current_step
        modified = step.last_modified if step else None
    except AttributeError:
        modified = 0

    if modified is None:
        # If the step has no modified time it hasn't been run yet and
        # a reload won't be needed
        return False

    newer_than = modified if not force and modified else 0

    if recursive:
        children_reloaded = reload_children(module, newer_than)
    else:
        children_reloaded = False
    reloaded = do_reload(module, newer_than)

    return reloaded or children_reloaded