def run(self, document):
    prop_id = 'http://www.wikidata.org/prop/direct/P31'
    if any([i for i in self.wikidata_triples.get(document.docid) if ((i[1] == prop_id) and (i[2] in self.entities))]):
        document = None
    return document
def run(self, document):
    prop_id = 'http://www.wikidata.org/prop/direct/P31'
    if any([i for i in self.wikidata_triples.get(document.docid) if ((i[1] == prop_id) and (i[2] in self.entities))]):
        document = None
    return document