code: def test_read_simple_file(
      ext,
      rnb="""#' ---
  #' title: Simple file
  #' ---
  
  #' Here we have some text
  #' And below we have some R code
  
  f <- function(x) {
      x + 1
      }
  
  
  h <- function(y)
      y + 1
  """,
  ):
      nb = jupytext.reads(rnb, ext)
      assert len(nb.cells) == 4
      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 == "Here we have some text\n"
          "And below we have some R code"
      )
      assert nb.cells[2].cell_type == "code"
      compare(
          nb.cells[2].source,
          """f <- function(x) {
      x + 1
      }""",
      )
      assert nb.cells[3].cell_type == "code"
      compare(
          nb.cells[3].source,
          """h <- function(y)
      y + 1""",
      )
  
      rnb2 = jupytext.writes(nb, ext)
      compare(rnb2, rnb)
  
file_path: jupytext/tests/functional/simple_notebooks/test_read_simple_R.py
imports: import pytest
  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(ext, rnb) without return types