def _removeHeaderAndFooterFromHeidelTimedDoc(doc: dict) -> dict:
    """
    HeidelTime creates a header and footer. This function removes them.
    @param doc: The document header and footer are removed from
    @return: The document without header and footer
    """
    doc["text"] = doc["text"].replace('<?xml version="1.0"?>\n<!DOCTYPE TimeML SYSTEM "TimeML.dtd">\n<TimeML>\n', '')
    doc["text"] = doc["text"].replace('\n</TimeML>\n\n', '')
    return doc