def METHOD_NAME(tmpdir):
    cfg_file = tmpdir.join(".jupytext.yml")
    nb_file = tmpdir.join("notebook.ipynb")
    py_file = tmpdir.join("notebook.py")
    cfg_file.write("formats: 'ipynb,py'\n")
    nbformat.write(new_notebook(), str(nb_file))
    jupytext([str(nb_file), "--sync"])
    assert nb_file.isfile()
    assert py_file.isfile()
    nb = nbformat.read(nb_file, as_version=4)
    assert "jupytext" not in nb.metadata