code: def _extract_node_text(node):
      
  
      texts = map(
          six.text_type.strip, map(six.text_type, map(unescape, node.xpath(".//text()")))
      )
      return " ".join(text for text in texts if text)
docs: Extract text from a given lxml node.