code: def test_escape_start_pattern(
      ext,
      rnb="""#' The code start pattern '#+' can
  #' appear in code and markdown cells.
  
  #' In markdown cells it is escaped like here:
  #' #+ fig.width=12
  
  # In code cells like this one, it is also escaped
  # #+ cell_name language="python"
  1 + 1
  """,
  ):
      nb = jupytext.reads(rnb, ext)
      assert len(nb.cells) == 3
      assert nb.cells[0].cell_type == "markdown"
      assert nb.cells[1].cell_type == "markdown"
      assert nb.cells[2].cell_type == "code"
      assert (
          nb.cells[1].source
          == """In markdown cells it is escaped like here:
  #+ fig.width=12"""
      )
      assert (
          nb.cells[2].source
          == """# In code cells like this one, it is also escaped
  #+ cell_name language="python"
  1 + 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 5 for calling a global function with example usage: test_escape_start_pattern(ext, rnb) without return types