def __init__(
        self,
        value=("a",),
        available_items={"a", "b", "c"},
        width=155,
        name="sorting_button",
        command=empty_function,
        coordinates_name="topleft",
        coordinates_value=(0, 0),
    ):
        """Store value and define button image and label.

        value (sequence)
            initial value of the widget.
        available_items (set)
            additional values that can compose the list.
        name (string)
            an arbitrary name to help identify the widget.
        coordinates_name (string)
            represents attribute name of rect wherein
            to store the position information from the
            coordinates value parameter.
        coordinates_value (list/tuple/vector w/ 2 integers)
            represents the x and y coordinates of a
            position in 2d space.
        """
        ### validate arguments
        self.validate_value(value, available_items)

        ### store arguments

        self.value = value
        self.available_items = available_items

        self.name = name
        self.command = command

        ### create a surface to clean the image attribute
        ### surface every time the value changes

        ### TODO make this 155 to be the result of some
        ### meaningful calculation; probably a new max width
        ### argument minus the width of the icon;

        self.clean_surf = render_rect(width, 19, LIST_SORTING_BUTTON_BG)

        draw_border(self.clean_surf, LIST_SORTING_BUTTON_FG)

        ### create an image from the clean surf
        self.image = self.clean_surf.copy()

        ### update the image contents with the value
        self.update_image()

        ### create rect from the image attribute and
        ### position it

        self.rect = self.image.get_rect()
        setattr(self.rect, coordinates_name, coordinates_value)
Store value and define button image and label.

        value (sequence)
            initial value of the widget.
        available_items (set)
            additional values that can compose the list.
        name (string)
            an arbitrary name to help identify the widget.
        coordinates_name (string)
            represents attribute name of rect wherein
            to store the position information from the
            coordinates value parameter.
        coordinates_value (list/tuple/vector w/ 2 integers)
            represents the x and y coordinates of a
            position in 2d space.
        
nodezator/widget/sortingbutton.py