def do_entities_overlap(entities):
    """Checks if entities overlap.

    I.e. cross each others start and end boundaries.

    :param entities: list of entities
    :return: boolean
    """
    sorted_entities = sorted(entities, key=lambda e: e['start'])
    for i in range(len(sorted_entities) - 1):
        curr_ent = sorted_entities[i]
        next_ent = sorted_entities[i + 1]
        if next_ent['start'] < curr_ent['end'] and next_ent['entity'
            ] != curr_ent['entity']:
            return True
    return False
