def create_reader(note_type, body_reader):
    def read_notes_xml_element(element):
        note_elements = lists.filter(
            _is_note_element,
            element.find_children("w:" + note_type),
        )
        return results.combine(lists.map(_read_note_element, note_elements))


    def _is_note_element(element):
        return ["continuationSeparator", "separator"] not in element.attributes.get("w:type")


    def _read_note_element(element):
        return body_reader.read_all(element.children).map(lambda body: 
            documents.note(
                note_type=note_type,
                note_id=element.attributes["w:id"],
                body=body
            ))
    
    return read_notes_xml_element
dataset/ETHPy150Open mwilliamson/python-mammoth/mammoth/docx/notes_xml.py/create_reader/swapped operands of `not in`