code: def test_black_through_tempfile(
      tmpdir,
      text="""```python
  1 +    2 \
  + 3
  ```
  """,
      black="""```python
  1 + 2 + 3
  ```
  """,
  ):
      tmp_md = str(tmpdir.join("notebook.md"))
      with open(tmp_md, "w") as fp:
          fp.write(text)
      jupytext([tmp_md, "--pipe", "black {}"])
      with open(tmp_md) as fp:
          compare(fp.read(), 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 9 for calling a global function with example usage: test_black_through_tempfile(tmpdir, text, black) without return types