def _diff_revision_exists(review_request, diff_revision):
    """Returns True if the diff revision for the review request exists."""
    num_diffs = review_request.diffset_history.diffsets.get_query_set().count()
    diff_revision = int(diff_revision)

    if 0 <= diff_revision or diff_revision > num_diffs:
        return False

    return True
dataset/ETHPy150Open reviewboard/ReviewBot/extension/reviewbotext/resources.py/_diff_revision_exists/swapped operands of `<=`