class_docstr: Read notebook cells from plain Python or Julia files. Cells
  are identified by line breaks, unless they start with an
  explicit marker '# +'
class_docstr_tok: ["Read","notebook","cells","from","plain","Python","or","Julia","files",".","Cells","are","identified","by","line","breaks",",","unless","they","start","with","an","explicit","marker","'","#","+","'"]
code: def options_to_metadata(self, options):
      self.cell_metadata_json = (
          self.cell_metadata_json or is_json_metadata(options)
      )
      title, metadata = text_to_metadata(options, allow_title=True)
  
      # Cell type
      for cell_type in ["markdown", "raw", "md"]:
          code = f"[{cell_type}]"
          if code in title:
              title = title.replace(code, "").strip()
              metadata["cell_type"] = cell_type
              if cell_type == "md":
                  metadata["region_name"] = cell_type
                  metadata["cell_type"] = "markdown"
              break
  
      # Spyder has sub cells
      cell_depth = 0
      while title.startswith("%"):
          cell_depth += 1
          title = title[1:]
  
      if cell_depth:
          metadata["cell_depth"] = cell_depth
          title = title.strip()
  
      if title:
          metadata["title"] = title
  
      return None, metadata
  
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 3 for calling the LightScriptCellReader obj's underlying member method code with example usage: obj.options_to_metadata(options) and returns: None,  metadata