def parse_unit(prop, dictionary, dt=None):
<EOL>try:<EOL><INDENT>dt = timezone.parse_datetime(dictionary.get('<STR_LIT>'))<EOL><DEDENT>except TypeError:<EOL><INDENT>dt = None<EOL><DEDENT>matches = [k for k in dictionary.keys() if prop in k]<EOL>try:<EOL><INDENT>value = dictionary[matches[<NUM_LIT:0>]]<EOL>unit = re.search(r'<STR_LIT>', matches[<NUM_LIT:0>])<EOL><DEDENT>except IndexError:<EOL><INDENT>return None<EOL><DEDENT>if '<STR_LIT:;>' in value:<EOL><INDENT>values = [val for val in value.split('<STR_LIT:;>') if val != '<STR_LIT>']<EOL>if unit:<EOL><INDENT>return [Observation(v, unit.group(<NUM_LIT:1>), dt) for v in values]<EOL><DEDENT>else:<EOL><INDENT>return values<EOL><DEDENT><DEDENT>if not value or not unit:<EOL><INDENT>return value or None<EOL><DEDENT>return Observation(value, unit.group(<NUM_LIT:1>), dt)<EOL>
Do a fuzzy match for `prop` in the dictionary, taking into account unit suffix.