def parse_optional_item(elt, path, parser):
    """If elt.find(path) returns an item, apply parser to it and return the result.
    Else, return None.
    """
    item = elt.find(path)
    if item is not None:
        item = parser(item)
    return item
