code: def extract_paragraphs(xml_string):
      
      tree = etree.fromstring(xml_string.encode('utf-8'))
  
      paragraphs = []
      # In NLM xml, all plaintext is within <p> tags, and is the only thing
      # that can be contained in <p> tags. To handle to possibility of namespaces
      # uses regex to search for tags either of the form 'p' or '{<namespace>}p'
      for element in tree.iter():
          if isinstance(element.tag, basestring) and \
             re.search('(^|})[p|title]$', element.tag) and element.text:
              paragraph = ' '.join(element.itertext())
              paragraphs.append(paragraph)
      return paragraphs
docs: Returns list of paragraphs in an NLM XML.
  
      Parameters
      ----------
      xml_string : str
          String containing valid NLM XML.
  
      Returns
      -------
      list of str
          List of extracted paragraphs in an NLM XML