def _assert_expected_object_types_for_predicates(graph, predicates, types):
    for s, p, o in graph:
        if p in predicates:
            someTrue = [isinstance(o, t) for t in types]
            assert True in someTrue, \
                    (type(o), p) % "Bad type %s for object when predicate is <%s>."
dataset/ETHPy150Open RDFLib/rdflib/test/test_serializexml.py/_assert_expected_object_types_for_predicates/swapped operands of `%`