code: def test_read_more_complex_file(
      script="""'''This is a markdown cell'''
  
  1 + 2 + 3 + 4
  5
  6
  
  '''
  Another markdown cell'''
  #################################
  # A third one
  
  '''
  Another markdown cell'''
  1 + 2 + 3 + 4
  
  # ################################
  # A fifth one
  
  '''And a last one
  '''
  """,
  ):
      nb = jupytext.reads(script, "py:sphinx")
  
      assert nb.cells[0].cell_type == "code"
      assert nb.cells[0].source == "%matplotlib inline"
  
      assert nb.cells[1].cell_type == "markdown"
      assert nb.cells[1].source == "This is a markdown cell"
  
      assert nb.cells[2].cell_type == "code"
      compare(
          nb.cells[2].source,
          """1 + 2 + 3 + 4
  5
  6""",
      )
      assert nb.cells[3].cell_type == "markdown"
      assert nb.cells[3].source == "Another markdown cell"
  
      assert nb.cells[4].cell_type == "markdown"
      assert nb.cells[4].source == "A third one"
  
      assert nb.cells[5].cell_type == "markdown"
      assert nb.cells[5].source == "Another markdown cell"
  
      assert nb.cells[6].cell_type == "code"
      assert nb.cells[6].source == "1 + 2 + 3 + 4"
  
      assert nb.cells[7].cell_type == "markdown"
      assert nb.cells[7].source == "A fifth one"
  
      assert nb.cells[8].cell_type == "markdown"
      assert nb.cells[8].source == "And a last one"
  
      assert len(nb.cells) == 9
  
imports: import jupytext
  from jupytext.compare import compare
label_desc: Use image node_id 2 for calling a global function with example usage: test_read_more_complex_file(script) without return types