code: def test_magics_are_not_commented(fmt):
      nb = new_notebook(
          cells=[new_code_cell("%pylab inline")],
          metadata={
              "jupytext": {
                  "comment_magics": False,
                  "main_language": "R"
                  if fmt == "R"
                  else "scheme"
                  if fmt.startswith("ss")
                  else "python",
              }
          },
      )
  
      text = jupytext.writes(nb, fmt)
      assert "%pylab inline" in text.splitlines()
      nb2 = jupytext.reads(text, fmt)
  
      if "sphinx" in fmt:
          nb2.cells = nb2.cells[1:]
  
      compare_notebooks(nb2, nb)
  
imports: import pytest
  from nbformat.v4.nbbase import new_code_cell, new_notebook
  import jupytext
  from jupytext.compare import compare, compare_notebooks, notebook_model
  from jupytext.magics import _PYTHON_MAGIC_ASSIGN, comment_magic, is_magic, uncomment_magic, unesc
label_desc: Use image node_id 9 for calling a global function with example usage: test_magics_are_not_commented(fmt) without return types