def METHOD_NAME(sample_md_notebook, tmp_path):
    md_file = tmp_path / "nb.md"
    md_file.write_text(sample_md_notebook)
    # read md notebook on stdin - this does the same as
    # cat notebook.md | jupytext --execute
    with open(md_file) as fp, mock.patch("sys.stdin", fp):
        jupytext(["--execute"])
    new_md_text = md_file.read_text()
    assert __version__ not in new_md_text
    assert "kernelspec" not in new_md_text