def create_buttons(
        self,
        buttons,
    ):
        """Create buttons for the dialog.

        Parameters
        ==========

        buttons (iterable with 2-tuples or None)
            Each 2-tuple represents a button. The first
            value is a string for the button text and the
            second value is an arbitrary value to be
            returned by that button.
        """
        ### create special list to store button objects
        self.buttons = List2D()

        ### if buttons parameter is None, create a single
        ### "Dismiss" button

        if buttons is None:

            self.buttons.append(
                CachedTextObject(
                    text="Dismiss",
                    text_settings=(NORMAL_BUTTON_SETTINGS),
                    value=None,
                )
            )

        ### otherwise create a button for each action

        else:

            self.buttons.extend(
                CachedTextObject(
                    text=button_text,
                    text_settings=(NORMAL_BUTTON_SETTINGS),
                    value=button_value,
                )
                for button_text, button_value in buttons
            )

        ### position buttons relative to each other

        self.buttons.rect.snap_rects_intermittently_ip(

            ### interval limit

            dimension_name='width',
            dimension_unit='pixels',
            max_dimension_value = 800,

            ### rect positioning

            retrieve_pos_from="topright",
            assign_pos_to="topleft",
            offset_pos_by=(10, 0),

            ### intermittent rect positioning

            intermittent_pos_from="bottomleft",
            intermittent_pos_to="topleft",
            intermittent_offset_by=(0, 10),

        )
Create buttons for the dialog.

        Parameters
        ==========

        buttons (iterable with 2-tuples or None)
            Each 2-tuple represents a button. The first
            value is a string for the button text and the
            second value is an arbitrary value to be
            returned by that button.
        
nodezator/dialog.py