def METHOD_NAME(plan: "Plan"):
    """Execute a plan on the local machine."""
    # NOTE: Quoting string values causes a double quoting when passed to ``subprocess.run``
    command_line = plan.to_argv(quote_string=False)
    os_env = os.environ.copy()
    env = get_workflow_parameters_env_vars(workflow=plan)
    os_env.update(env)
    try:
        command_str = " ".join(plan.to_argv(with_streams=True))
        communication.echo(f"Executing step '{plan.name}': '{command_str}' ...")
        with get_plan_std_stream_mapping(plan) as std_streams_mappings:
            return_code = subprocess.run(command_line, cwd=os.getcwd(), env=os_env, **std_streams_mappings).returncode
    except OSError:
        tb = "\n  ".join(traceback.format_exc().split("\n"))
        raise errors.WorkflowExecuteError(f"Execution of step '{plan.name}' failed:\n\n  {tb}", show_prefix=False)
    success_codes = plan.success_codes or [0]
    if return_code not in success_codes:
        message = f"Execution of step '{plan.name}' returned {return_code} exit status which is not in {success_codes}"
        raise errors.InvalidSuccessCode(return_code=return_code, message=message)