def __init__(
        self,
        value=False,
        name="check_button",
        size=16,
        foreground_color=CHECKBUTTON_FG,
        background_color=CHECKBUTTON_BG,
        outline_color=CHECKBUTTON_OUTLINE,
        command=empty_function,
        coordinates_name="topleft",
        coordinates_value=(0, 0),
    ):
        """Store arguments and perform setups.

        Parameters
        ==========

        value (boolean)
            represents current value of the widget.
        name (string)
            an arbitrary name to help identify the widget.
        size (positive integer)
            represents value of both width and height of
            the checkbutton surface, in pixels.
        command (callable)
            optional command to be execute when the
            value is changed. Default is an empty function
            which does nothing.
        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.
        """
        ### ensure value is a boolean

        if not isinstance(value, bool):

            raise TypeError("'value' argument must be of type 'bool'")

        ### store value, command and name arguments

        self.value = value
        self.command = command
        self.name = name

        ### try retrieving a surface for specific styles
        ### used

        ## define a string to use as a key from the styles
        ## used

        key = str((size, foreground_color, background_color, outline_color))

        ## try retrieving a surface map for the specific
        ## styles used
        try:
            self.surface_map = self.styles_to_surface_map[key]

        ### if there isn't one, create it yourself

        except KeyError:

            ### create the surface map with the given styles

            surface_map = self.get_surface_map(
                size, foreground_color, background_color, outline_color
            )

            ### store the surface map in its own attribute
            ### and also in the "size to surface map" dict
            ### in the class attribute, using the original
            ### size (not the corrected one) as the key

            self.surface_map = self.__class__.styles_to_surface_map[key] = surface_map

        ### create image attribute
        self.update_image()

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

        self.rect = self.image.get_rect()
        setattr(self.rect, coordinates_name, coordinates_value)
Store arguments and perform setups.

        Parameters
        ==========

        value (boolean)
            represents current value of the widget.
        name (string)
            an arbitrary name to help identify the widget.
        size (positive integer)
            represents value of both width and height of
            the checkbutton surface, in pixels.
        command (callable)
            optional command to be execute when the
            value is changed. Default is an empty function
            which does nothing.
        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/checkbutton.py