def get_common_properties(root):
properties = {}<EOL>for elem in root.iterfind('<STR_LIT>'):<EOL><INDENT>name = elem.attrib['<STR_LIT:name>']<EOL>if name == '<STR_LIT>':<EOL><INDENT>properties['<STR_LIT>'] = {'<STR_LIT>': [], '<STR_LIT>': None}<EOL>for child in elem.iter('<STR_LIT>'):<EOL><INDENT>spec = {}<EOL>spec['<STR_LIT>'] = child.find('<STR_LIT>').attrib['<STR_LIT>']<EOL>units = child.find('<STR_LIT>').attrib['<STR_LIT>']<EOL>try:<EOL><INDENT>spec['<STR_LIT>'] = child.find('<STR_LIT>').attrib['<STR_LIT>']<EOL><DEDENT>except KeyError:<EOL><INDENT>warn('<STR_LIT>' + spec['<STR_LIT>'])<EOL>pass<EOL><DEDENT>if units in ['<STR_LIT>', '<STR_LIT>', '<STR_LIT>']:<EOL><INDENT>spec['<STR_LIT>'] = [float(child.find('<STR_LIT>').text)]<EOL><DEDENT>elif units == '<STR_LIT>':<EOL><INDENT>warn('<STR_LIT>')<EOL>spec['<STR_LIT>'] = [float(child.find('<STR_LIT>').text)]<EOL>units = '<STR_LIT>'<EOL><DEDENT>elif units == '<STR_LIT>':<EOL><INDENT>warn('<STR_LIT>')<EOL>spec['<STR_LIT>'] = [float(child.find('<STR_LIT>').text) * <NUM_LIT>]<EOL>units = '<STR_LIT>'<EOL><DEDENT>elif units == '<STR_LIT>':<EOL><INDENT>warn('<STR_LIT>')<EOL>spec['<STR_LIT>'] = [float(child.find('<STR_LIT>').text) * <NUM_LIT>]<EOL>units = '<STR_LIT>'<EOL><DEDENT>else:<EOL><INDENT>raise KeywordError('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>)<EOL><DEDENT>properties['<STR_LIT>']['<STR_LIT>'].append(spec)<EOL>if properties['<STR_LIT>']['<STR_LIT>'] is None:<EOL><INDENT>properties['<STR_LIT>']['<STR_LIT>'] = units<EOL><DEDENT>elif properties['<STR_LIT>']['<STR_LIT>'] != units:<EOL><INDENT>raise KeywordError('<STR_LIT>' + units +<EOL>'<STR_LIT>' +<EOL>properties['<STR_LIT>']['<STR_LIT>']<EOL>)<EOL><DEDENT><DEDENT><DEDENT>elif name in datagroup_properties:<EOL><INDENT>field = name.replace('<STR_LIT:U+0020>', '<STR_LIT:->')<EOL>units = elem.attrib['<STR_LIT>']<EOL>if units == '<STR_LIT>':<EOL><INDENT>units = '<STR_LIT>'<EOL><DEDENT>quantity = <NUM_LIT:1.0> * unit_registry(units)<EOL>try:<EOL><INDENT>quantity.to(property_units[field])<EOL><DEDENT>except pint.DimensionalityError:<EOL><INDENT>raise KeywordError('<STR_LIT>' + name)<EOL><DEDENT>properties[field] = ['<STR_LIT:U+0020>'.join([elem.find('<STR_LIT:value>').text, units])]<EOL><DEDENT>else:<EOL><INDENT>raise KeywordError('<STR_LIT>' + name + '<STR_LIT>')<EOL><DEDENT><DEDENT>return properties<EOL>
Read common properties from root of ReSpecTh XML file.

    Args:
        root (`~xml.etree.ElementTree.Element`): Root of ReSpecTh XML file

    Returns:
        properties (`dict`): Dictionary with common properties