code: def test_pipe_black_removes_lines_to_next_cell_metadata(
      tmpdir,
      cwd_tmpdir,
      text="""# %%
  def func():
      return 42
  # %%
  func()""",
  ):
      tmpdir.join("notebook.py").write(text)
      jupytext(["--set-formats", "ipynb,py:percent", "notebook.py"])
  
      nb = read(tmpdir.join("notebook.ipynb"))
      assert nb.cells[0].metadata["lines_to_next_cell"] == 0
  
      jupytext(["--sync", "notebook.py", "--pipe", "black"])
      nb = read(tmpdir.join("notebook.ipynb"))
      assert "lines_to_next_cell" not in nb.cells[0].metadata
  
      new_text = tmpdir.join("notebook.py").read()
      assert "\n\n# %%\nfunc()" in new_text
  
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 10 for calling a global function with example usage: test_pipe_black_removes_lines_to_next_cell_metadata(tmpdir, cwd_tmpdir, text) without return types