code: def docx_text_from_xml_node(node: ElementTree.Element,
                              level: int,
                              config: TextProcessingConfig) -> str:
      
      text = ''
      # log.debug("Level {}, tag {}", level, node.tag)
      if node.tag == DOCX_TEXT:
          text += node.text or ''
      elif node.tag == DOCX_TAB:
          text += '\t'
      elif node.tag in DOCX_NEWLINES:
          text += '\n'
      elif node.tag == DOCX_NEWPARA:
          text += '\n\n'
  
      if node.tag == DOCX_TABLE:
          text += '\n\n' + docx_table_from_xml_node(node, level, config)
      else:
          for child in node:
              text += docx_text_from_xml_node(child, level + 1, config)
      return text
docs: Returns text from an XML node within a DOCX file.
  
      Args:
          node: an XML node
          level: current level in XML hierarchy (used for recursion; start level
              is 0)
          config: :class:`TextProcessingConfig` control object
  
      Returns:
          contents as a string