def __init__(self, data, midtop=None):
        """Setup attributes for storage and control.

        Parameters
        ==========
        data (dict)
            data representing the comment instance.
        midtop (2-tuple of integers; or None)
            represents the absolute midtop position of
            the comment on screen. If no midtop is received
            (the default None is used), then the midtop
            information is retrieved from the comment data.
        """
        ### store the instance data argument in its own
        ### attribute
        self.data = data

        ### check whether text of text block is valid,
        ### raising exception if not;
        check_text_block_text(self.data["text"])

        ### store the midtop position

        self.midtop = midtop if midtop is not None else self.data["midtop"]

        ### create surface for image attribute
        self.image = get_text_block_surf(self.data["text"])

        ### create and position rect

        self.rect = self.image.get_rect()
        self.rect.midtop = self.midtop

        ### create control to indicate when the text block
        ### was subject to a mouse click
        self.mouse_click_target = False
Setup attributes for storage and control.

        Parameters
        ==========
        data (dict)
            data representing the comment instance.
        midtop (2-tuple of integers; or None)
            represents the absolute midtop position of
            the comment on screen. If no midtop is received
            (the default None is used), then the midtop
            information is retrieved from the comment data.
        
nodezator/graphman/textblock/main.py