code: def test_read_simple_file(
      script="""# ---
  # title: Simple file
  # ---
  
  # %% [markdown]
  # This is 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
  %%pylab inline
  
  7
  """,
  ):
      nb = jupytext.reads(script, "py:hydrogen")
      assert len(nb.cells) == 6
      assert nb.cells[0].cell_type == "raw"
      assert nb.cells[0].source == "---\ntitle: Simple file\n---"
      assert nb.cells[1].cell_type == "markdown"
      assert nb.cells[1].source == "This is a markdown cell"
      assert nb.cells[2].cell_type == "raw"
      assert nb.cells[2].source == "This is a raw cell"
      assert nb.cells[3].cell_type == "code"
      assert nb.cells[3].source == "# This is a sub-cell"
      assert nb.cells[3].metadata["title"] == "sub-cell title"
      assert nb.cells[4].cell_type == "code"
      assert nb.cells[4].source == "# This is a sub-sub-cell"
      assert nb.cells[4].metadata["title"] == "sub-sub-cell title"
      assert nb.cells[5].cell_type == "code"
      compare(
          nb.cells[5].source,
          """1 + 2 + 3 + 4
  5
  6
  %%pylab inline
  
  7""",
      )
      assert nb.cells[5].metadata == {"title": "And now a code cell"}
  
      script2 = jupytext.writes(nb, "py:hydrogen")
      compare(script2, script)
  
file_path: jupytext/tests/functional/simple_notebooks/test_read_simple_hydrogen.py
imports: import jupytext
  from jupytext.compare import compare
label_desc: Use image node_id 1 for calling a global function with example usage: test_read_simple_file(script) without return types