code: def test_paired_notebook_ipynb_root_scripts_in_folder_806(
      tmpdir, cwd_tmpdir, python_notebook
  ):
      """In this test we pair a notebook with a script in a subfolder, and then do some
      natural operations like delete/recreate one of the paired files"""
      # Save sample notebook
      test_ipynb = tmpdir / "test.ipynb"
      jupytext.write(python_notebook, str(test_ipynb))
  
      # Pair the notebook to a script in a subfolder
      jupytext_cli(
          ["--set-formats", "ipynb,scripts//py:percent", "test.ipynb"]
      )
      assert (tmpdir / "scripts" / "test.py").exists()
  
      # Delete and then recreate the ipynb notebook using --to notebook
      test_ipynb.remove()
      jupytext_cli(
          [
              "--to",
              "notebook",
              "--output",
              "test.ipynb",
              "scripts/test.py",
          ]
      )
      assert test_ipynb.exists()
  
      # Delete and then recreate the ipynb notebook using --sync
      test_ipynb.remove()
      jupytext_cli(
          [
              "--sync",
              "scripts/test.py",
          ]
      )
      assert test_ipynb.exists()
  
imports: import os
  import unittest.mock
  import pytest
  import jupytext
  from jupytext.cli import jupytext
  from jupytext.compare import compare
  from jupytext.contentsmanager import TextFileContentsManager
  from jupytext.formats import long_form_multiple_formats, long_form_one_format, short_form_multiple_formats
  from jupytext.paired_paths import InconsistentPath, base_path, full_path, paired_paths
label_desc: Use image node_id 21 for calling a global function with example usage: test_paired_notebook_ipynb_root_scripts_in_folder_806(tmpdir, cwd_tmpdir, python_notebook) without return types