code: def test_notebook_with_python3_magic(
      no_jupytext_version_number,
      nb=new_notebook(
          metadata={
              "kernelspec": {
                  "display_name": "Python 3",
                  "language": "python",
                  "name": "python3",
              }
          },
          cells=[
              new_code_cell("%%python2\na = 1\nprint a"),
              new_code_cell("%%python3\nb = 2\nprint(b)"),
          ],
      ),
      text="""---
  jupyter:
    kernelspec:
      display_name: Python 3
      language: python
      name: python3
  ---
  
  ```python2
  a = 1
  print a
  ```
  
  ```python3
  b = 2
  print(b)
  ```
  """,
  ):
      md = jupytext.writes(nb, "md")
      compare(md, text)
  
      nb2 = jupytext.reads(md, "md")
      compare_notebooks(nb2, nb)
  
imports: from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook, new_raw_cell
  import jupytext
  from jupytext.combine import combine_inputs_with_outputs
  from jupytext.compare import compare, compare_cells, compare_notebooks
label_desc: Use image node_id 32 for calling a global function with example usage: test_notebook_with_python3_magic(no_jupytext_version_number, nb, text) without return types