class_docstr: Read notebook cells from Markdown documents
class_docstr_tok: ["Read","notebook","cells","from","Markdown","documents"]
code: def metadata_and_language_from_option_line(self, line):
      match_region = self.start_region_re.match(line)
      if match_region:
          self.in_region = True
          groups = match_region.groups()
          region_name = groups[0]
          self.end_region_re = re.compile(
              rf"^<!--\s*#end{region_name}\s*-->\s*$"
          )
          self.cell_metadata_json = (
              self.cell_metadata_json or is_json_metadata(groups[1])
          )
          title, self.metadata = text_to_metadata(
              groups[1], allow_title=True
          )
          if region_name == "raw":
              self.cell_type = "raw"
          else:
              self.cell_type = "markdown"
          if title:
              self.metadata["title"] = title
          if region_name in ["markdown", "md"]:
              self.metadata["region_name"] = region_name
      elif self.start_code_re.match(line):
          self.language, self.metadata = self.options_to_metadata(
              self.start_code_re.findall(line)[0]
          )
          # Cells with a .noeval attribute are markdown cells #347
          if self.metadata.get(".noeval", "") is None:
              self.cell_type = "markdown"
              self.metadata = {}
              self.language = None
  
imports: import re
  import warnings
  from copy import copy
  from nbformat.v4.nbbase import new_code_cell, new_markdown_cell, new_raw_cell
  from packaging.version import parse
  from .doxygen import doxygen_to_markdown
  from .languages import _SCRIPT_EXTENSIONS
  from .cell_metadata import is_active, is_json_metadata, rmd_options_to_metadata, text_to_metadata
  from .languages import _JUPYTER_LANGUAGES_LOWER_AND_UPPER
  from .magics import is_magic, need_explicit_marker, uncomment_magic, unescape_code_start
  from .pep8 import pep8_lines_between_cells
  from .stringparser import StringParser
label_desc: Use image node_id 2 for calling the MarkdownCellReader obj's underlying member method code with example usage: obj.metadata_and_language_from_option_line(line) without return types