code: def test_read_simple_file(
      script="""# ---
  # title: Simple file
  # ---
  
  # %% [markdown]
  # This is a markdown cell
  
  # %% [md]
  # This is also a markdown cell
  
  # %% [raw]
  # This is a raw cell
  
  # %%% sub-cell title
  # This is a sub-cell
  
  # %%%% sub-sub-cell title
  # This is a sub-sub-cell
  
  # %% And now a code cell
  1 + 2 + 3 + 4
  5
  6
  # %%magic # this is a commented magic, not a cell
  
  7
  """,
  ):
      nb = jupytext.reads(script, "py:percent")
      compare_notebooks(
          new_notebook(
              cells=[
                  new_raw_cell("---\ntitle: Simple file\n---"),
                  new_markdown_cell("This is a markdown cell"),
                  new_markdown_cell(
                      "This is also a markdown cell",
                      metadata={"region_name": "md"},
                  ),
                  new_raw_cell("This is a raw cell"),
                  new_code_cell(
                      "# This is a sub-cell",
                      metadata={
                          "title": "sub-cell title",
                          "cell_depth": 1,
                      },
                  ),
                  new_code_cell(
                      "# This is a sub-sub-cell",
                      metadata={
                          "title": "sub-sub-cell title",
                          "cell_depth": 2,
                      },
                  ),
                  new_code_cell(
                      """1 + 2 + 3 + 4
  5
  6
  %%magic # this is a commented magic, not a cell
  
  7""",
                      metadata={"title": "And now a code cell"},
                  ),
              ]
          ),
          nb,
      )
  
      script2 = jupytext.writes(nb, "py:percent")
      compare(script2, script)
  
imports: import os
  import pytest
  from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook, new_raw_cell
  import jupytext
  from jupytext.compare import compare, compare_notebooks, notebook_model
label_desc: Use image node_id 1 for calling a global function with example usage: test_read_simple_file(script) without return types