def command():
            """Updates values in the option menu.

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

            list_widget_values = options_list_widget.get()
            option_menu_options = value_option_menu.options

            ### if options in the list widget are different
            ### (or in different order) than those on the
            ### option menu, update the options on the
            ### option menu so they are equal

            if option_menu_options != list_widget_values:

                option_menu_value = value_option_menu.get()

                value = (
                    option_menu_value
                    if option_menu_value in list_widget_values
                    else list_widget_values[0]
                )

                value_option_menu.reset_value_and_options(
                    value=value, options=(list_widget_values)
                )
Updates values in the option menu.

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