docs: def render(self, content_state=None):
          """
          Starts the export process on a given piece of content state.
          """
          if content_state is None:
              content_state = {}
  
          blocks = content_state.get('blocks', [])
          wrapper_state = WrapperState(self.block_map, blocks)
          document = DOM.create_element()
          entity_map = content_state.get('entityMap', {})
          min_depth = 0
  
          for block in blocks:
              depth = block['depth']
              elt = self.render_block(block, entity_map, wrapper_state)
  
              if depth > min_depth:
                  min_depth = depth
  
              # At level 0, append the element to the document.
              if depth == 0:
                  DOM.append_child(document, elt)
  
          # If there is no block at depth 0, we need to add the wrapper that contains the whole tree to the document.
          if min_depth > 0 and wrapper_state.stack.length() != 0:
              DOM.append_child(document, wrapper_state.stack.tail().elt)
  
          return DOM.render(document)