code: def test_simple_hook_with_explicit_format(tmpdir):
      nb_file = str(tmpdir.join("notebook.ipynb"))
      py_file = str(tmpdir.join("notebook.py"))
      nbformat.write(
          new_notebook(cells=[new_markdown_cell("Some text")]), nb_file
      )
  
      nb = jupytext.read(nb_file)
      jupytext.write(nb, py_file, fmt="py:percent")
  
      with open(py_file) as fp:
          text = fp.read()
  
      assert "# %% [markdown]" in text.splitlines()
      assert "# Some text" in text.splitlines()
  
file_path: jupytext/tests/functional/others/test_read_write_functions.py
imports: from io import StringIO
  from pathlib import Path
  import nbformat
  from nbformat.v4.nbbase import new_markdown_cell, new_notebook
  import jupytext
  from jupytext.compare import compare, compare_notebooks
label_desc: Use image node_id 2 for calling a global function with example usage: test_simple_hook_with_explicit_format(tmpdir) without return types