def execute_notebook(<EOL>input_path,<EOL>output_path,<EOL>parameters=None,<EOL>engine_name=None,<EOL>prepare_only=False,<EOL>kernel_name=None,<EOL>progress_bar=True,<EOL>log_output=False,<EOL>start_timeout=<NUM_LIT>,<EOL>report_mode=False,<EOL>cwd=None,<EOL>):
path_parameters = add_builtin_parameters(parameters)<EOL>input_path = parameterize_path(input_path, path_parameters)<EOL>output_path = parameterize_path(output_path, path_parameters)<EOL>logger.info("<STR_LIT>" % get_pretty_path(input_path))<EOL>logger.info("<STR_LIT>" % get_pretty_path(output_path))<EOL>with local_file_io_cwd():<EOL><INDENT>if cwd is not None:<EOL><INDENT>logger.info("<STR_LIT>".format(get_pretty_path(cwd)))<EOL><DEDENT>nb = load_notebook_node(input_path)<EOL>if parameters:<EOL><INDENT>nb = parameterize_notebook(nb, parameters, report_mode)<EOL><DEDENT>nb = prepare_notebook_metadata(nb, input_path, output_path, report_mode)<EOL>if not prepare_only:<EOL><INDENT>kernel_name = kernel_name or nb.metadata.kernelspec.name<EOL>with chdir(cwd):<EOL><INDENT>nb = papermill_engines.execute_notebook_with_engine(<EOL>engine_name,<EOL>nb,<EOL>input_path=input_path,<EOL>output_path=output_path,<EOL>kernel_name=kernel_name,<EOL>progress_bar=progress_bar,<EOL>log_output=log_output,<EOL>start_timeout=start_timeout,<EOL>)<EOL><DEDENT>raise_for_execution_errors(nb, output_path)<EOL><DEDENT>write_ipynb(nb, output_path)<EOL>return nb<EOL><DEDENT>
Executes a single notebook locally.

    Parameters
    ----------
    input_path : str
        Path to input notebook
    output_path : str
        Path to save executed notebook
    parameters : dict, optional
        Arbitrary keyword arguments to pass to the notebook parameters
    engine_name : str, optional
        Name of execution engine to use
    prepare_only : bool, optional
        Flag to determine if execution should occur or not
    kernel_name : str, optional
        Name of kernel to execute the notebook against
    progress_bar : bool, optional
        Flag for whether or not to show the progress bar.
    log_output : bool, optional
        Flag for whether or not to write notebook output_path to `stderr`
    start_timeout : int, optional
        Duration in seconds to wait for kernel start-up
    report_mode : bool, optional
        Flag for whether or not to hide input.
    cwd : str, optional
        Working directory to use when executing the notebook

    Returns
    -------
    nb : NotebookNode
       Executed notebook object