<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def extract_relationtypes(urml_xml_tree):
 """ extracts the allowed RST relation names and relation types from an URML XML file. Parameters urml_xml_tree : lxml.etree._ElementTree lxml ElementTree representation of an URML XML file Returns ------- relations : dict of (str, str) Returns a dictionary with RST relation names as keys (str) and relation types (either 'par' or 'hyp') as values (str). """

    return {rel.attrib['name']: rel.attrib['type']
            for rel in urml_xml_tree.iterfind('//header/reltypes/rel')
            if 'type' in rel.attrib}