def _comp_brat_ann(ann_a, ann_b):
    """Compare brat annotation records by their border indices.

    :param ann_a: annotation A
    :param ann_b: annotation B
    :return: 1 a < b; 0 a == b; -1 a > b
    :rtype: int
    """
    hash_a = (ann_a.get_left_border(), ann_a.get_right_border())
    hash_b = (ann_b.get_left_border(), ann_b.get_right_border())

    if hash_a < hash_b:
        return 1
    elif hash_a == hash_b:
        return 0
    else:
        return -1