def _all_are_equal(list_of_objects):
    """Helper function to check if all the items in a list are the same."""
    if not list_of_objects:
        return True
    if isinstance(list_of_objects[0], list):
        list_of_objects = [tuple(obj) for obj in list_of_objects]
    return len(set(list_of_objects)) == 1