def all_elements_equal(input_list):
    """Check if all elements in the list are equal."""
    if not input_list:
        return True
    return len(set(input_list)) == 1
Check if all elements in the list are equal.
smoe/utils/operations/operation_list.py