def command():
            """Updates values in the sorting button.

            Values of the sorting button are updated with
            the values in the list widget whenever the user
            edits values in the list widget.
            """
            ### retrieve values

            set_widget_values = items_set_widget.get()

            available_items = value_sorting_button.available_items

            ### if items in the list widget are different
            ### than those on the sorting button, update
            ### the available items on the sorting button

            if set_widget_values and set_widget_values != available_items:

                sorting_button_value = value_sorting_button.get()

                value = (
                    sorting_button_value
                    if set(sorting_button_value).issubset(set_widget_values)
                    else tuple(set_widget_values)[:1]
                )

                (
                    value_sorting_button.reset_value_and_available_items(
                        value=value,
                        available_items=(set_widget_values),
                    )
                )
Updates values in the sorting button.

            Values of the sorting button are updated with
            the values in the list widget whenever the user
            edits values in the list widget.
            
nodezator/editing/widgetpicker/subforms.py