def parse_notice(xml_file_path): """Read the notice from the XML file; fill out any missing fields""" with open(xml_file_path, 'rb') as f: notice_xml = NoticeXML(f.read(), xml_file_path).preprocess() if has_requirements(notice_xml): notice_xml.derive_where_needed() return notice_xml