code: def test_read_md_and_markdown_regions(
      markdown="""Some text
  
  <!-- #md -->
  A
  
  
  long
  cell
  <!-- #endmd -->
  
  <!-- #markdown -->
  Another
  
  
  long
  cell
  <!-- #endmarkdown -->
  """,
  ):
      nb = jupytext.reads(markdown, "md")
      assert nb.metadata["jupytext"]["main_language"] == "python"
      compare_cells(
          nb.cells,
          [
              new_markdown_cell("Some text"),
              new_markdown_cell(
                  """A
  
  
  long
  cell""",
                  metadata={"region_name": "md"},
              ),
              new_markdown_cell(
                  """Another
  
  
  long
  cell""",
                  metadata={"region_name": "markdown"},
              ),
          ],
          compare_ids=False,
      )
  
      markdown2 = jupytext.writes(nb, "md")
      compare(markdown2, markdown)
  
imports: from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_notebook, new_raw_cell
  import jupytext
  from jupytext.combine import combine_inputs_with_outputs
  from jupytext.compare import compare, compare_cells, compare_notebooks
label_desc: Use image node_id 2 for calling a global function with example usage: test_read_md_and_markdown_regions(markdown) without return types