def reposition_elements(self):
        """Used to reposition elements when setting mode.

        Also updates self.rect's size and position
        """
        ###
        body_rect = self.body.rect

        ###

        dx = NODE_OUTLINE_THICKNESS + 2
        dy = NODE_OUTLINE_THICKNESS

        self.label.rect.topleft = body_rect.move(dx, dy).topleft

        body_left = body_rect.left
        body_top  = body_rect.top

        ###

        if self.input_sockets:

            ## dys = delta ys, vertical distances
            dys = PARAM_DYS_FROM_TOP[self.data['operation_id']]

            for input_socket, dy in zip(self.input_sockets, dys):
                input_socket.rect.center = body_left, body_top + dy

        ###
        self.output_socket.rect.center = self.body.rect.midright

        ###
        rect = self.rect

        rect_left = rect.left = (
            ##
            self.input_sockets[0].rect.left
            if self.input_sockets
            ##
            else body_left
        )

        rect.width = self.output_socket.rect.right - rect_left

        ###
        rect.height = body_rect.height

        ###
        rect.top = body_top
Used to reposition elements when setting mode.

        Also updates self.rect's size and position
        
nodezator/graphman/operatornode/vizop.py