code: def parse_rst_content(content, state):
      
      # http://www.sphinx-doc.org/en/master/extdev/markupapi.html
      # #parsing-directive-content-as-rest
      container_node = nodes.section()
      container_node.document = state.document
  
      viewlist = ViewList()
      for i, line in enumerate(content.splitlines()):
          viewlist.append(line, source='', offset=i)
  
      with switch_source_input(state, viewlist):
          state.nested_parse(viewlist, 0, container_node)
  
      return container_node.children
docs: Parse rST-formatted string content into docutils nodes
  
      Parameters
      ----------
      content : `str`
          ReStructuredText-formatted content
      state : ``docutils.statemachine.State``
          Usually the directive's ``state`` attribute.
  
      Returns
      -------
      instance from ``docutils.nodes``
          Docutils node representing the ``content``.