def run(
        project: 'projects.Project',
        step: 'projects.ProjectStep',
) -> dict:
    """
    Carries out the execution of the step python source file by loading it into
    an artificially created module and then executing that module and returning
    the result.

    :param project:
        The currently open project.
    :param step:
        The project step for which the run execution will take place.
    :return:
        A dictionary containing the results of the run execution, which
        indicate whether or not the run was successful. If the run failed for
        any reason, the dictionary will contain error information for display.
    """

    target_module = create_module(project, step)
    source_code = load_step_file(step.source_path)

    try:
        code = InspectLoader.source_to_code(source_code, step.source_path)
    except SyntaxError as error:
        return render_syntax_error(project, error)

    def exec_test():
        step.test_locals = dict()
        step.test_locals.update(target_module.__dict__)
        exec(code, step.test_locals)

    try:
        set_executing(True)
        threads.abort_thread()

        if environ.modes.has(environ.modes.TESTING):
            exec_test()
        else:
            exec(code, target_module.__dict__)
        out = {
            'success': True,
            'stop_condition': projects.StopCondition(False, False)
        }
    except threads.ThreadAbortError:
        # Raised when a user explicitly aborts the running of the step through
        # a user-interface action.
        out = {
            'success': False,
            'stop_condition': projects.StopCondition(True, True)
        }
    except UserAbortError as error:
        # Raised when a user explicitly aborts the running of the step using
        # a cd.step.stop(). This behavior should be considered a successful
        # outcome as it was intentional on the part of the user that the step
        # abort running early.
        out = {
            'success': True,
            'stop_condition': projects.StopCondition(True, error.halt)
        }
    except Exception as error:
        out = render_error(project, error)

    set_executing(False)
    return out
Carries out the execution of the step python source file by loading it into
    an artificially created module and then executing that module and returning
    the result.

    :param project:
        The currently open project.
    :param step:
        The project step for which the run execution will take place.
    :return:
        A dictionary containing the results of the run execution, which
        indicate whether or not the run was successful. If the run failed for
        any reason, the dictionary will contain error information for display.