code: def test_apply_black_and_sync_on_paired_notebook(
      tmpdir, cwd_tmpdir, python_notebook
  ):
      # Load real notebook metadata to get the 'auto' extension in --pipe-fmt to work
      metadata = python_notebook.metadata
      metadata["jupytext"] = {"formats": "ipynb,py"}
      assert "language_info" in metadata
  
      nb_org = new_notebook(
          cells=[new_code_cell("1        +1", id="cell-id")],
          metadata=metadata,
      )
      nb_black = new_notebook(
          cells=[new_code_cell("1 + 1", id="cell-id")],
          metadata=metadata,
      )
  
      # Black in place
      write(nb_org, "notebook.ipynb")
      jupytext(["notebook.ipynb", "--pipe", "black", "--sync"])
  
      nb_now = read("notebook.ipynb")
      compare_notebooks(nb_now, nb_black, compare_ids=True)
      assert "language_info" in nb_now.metadata
  
      nb_now = read("notebook.py")
      nb_now.metadata["jupytext"].pop("text_representation")
      nb_black.metadata = {
          key: nb_black.metadata[key]
          for key in nb_black.metadata
          if key in _DEFAULT_NOTEBOOK_METADATA.split(",")
      }
      compare_notebooks(nb_now, nb_black)
  
imports: import os
  from copy import deepcopy
  from shutil import copyfile
  import pytest
  from nbformat.v4.nbbase import new_code_cell, new_notebook
  from jupytext import read, write
  from jupytext.cli import jupytext, pipe_notebook, system
  from jupytext.combine import black_invariant
  from jupytext.compare import compare, compare_cells, compare_notebooks
  from jupytext.header import _DEFAULT_NOTEBOOK_METADATA
label_desc: Use image node_id 7 for calling a global function with example usage: test_apply_black_and_sync_on_paired_notebook(tmpdir, cwd_tmpdir, python_notebook) without return types