code: def extract_relationtypes(rs3_xml_tree):
      
      return {rel.attrib['name']: rel.attrib['type']
              for rel in rs3_xml_tree.iter('rel')
              if 'type' in rel.attrib}
docs: extracts the allowed RST relation names and relation types from
      an RS3 XML file.
  
      Parameters
      ----------
      rs3_xml_tree : lxml.etree._ElementTree
          lxml ElementTree representation of an RS3 XML file
  
      Returns
      -------
      relations : dict of (str, str)
          Returns a dictionary with RST relation names as keys (str)
          and relation types (either 'rst' or 'multinuc') as values
          (str).