code: def test_unterminated_header(
      rmd="""---
  title: Unterminated header
  
  ```{python}
  1+3
  ```
  
  some text
  
  ```{r}
  1+4
  ```
  
  ```{python not_terminated}
  1+5
  """,
  ):
      nb = jupytext.reads(rmd, "Rmd")
      assert len(nb.cells) == 5
      assert nb.cells[0].cell_type == "markdown"
      assert nb.cells[0].source == "---\ntitle: Unterminated header"
      assert nb.cells[1].cell_type == "code"
      assert nb.cells[1].source == "1+3"
      assert nb.cells[2].cell_type == "markdown"
      assert nb.cells[2].source == "some text"
      assert nb.cells[3].cell_type == "code"
      assert nb.cells[3].source == "%%R\n1+4"
      assert nb.cells[4].cell_type == "code"
      assert nb.cells[4].metadata == {"name": "not_terminated"}
      assert nb.cells[4].source == "1+5"
  
label_desc: Use image node_id 3 for calling a global function with example usage: test_unterminated_header(rmd) without return types