elif predicate == 'overlaps': if bbox1.intersects(bbox2) and bbox1.touches(bbox2): result = True else: result = False