def create_visual_elements(self):
        """Create visual elements of the node."""
        ### create and position node body

        body = self.body = Object2D.from_surface(
            self.get_node_surf(),
            coordinates_name="midtop",
            coordinates_value=self.midtop,
        )

        ### alias body's rect
        self.body_rect = body.rect

        ### create id label
        label = self.label = Object2D.from_surface(self.get_new_label_surface())

        ### signature mode input sockets

        operation_id = self.data["operation_id"]

        params = [

            char

            for char, flag
            in zip(operation_id, CHAR_FILTERING_MAP[operation_id])

            if flag

        ]

        signature_input_sockets = self.signature_input_sockets = [

            InputSocket(
                node=self,
                type_codename=TYPE_CODENAME,
                parameter_name=char,
            )

            for char in params

        ]

        ### signature mode output socket

        signature_output_socket = self.signature_output_socket = OutputSocket(
            node=self,
            type_codename=TYPE_CODENAME,
        )

        self.signature_output_sockets = (signature_output_socket,)

        ### callable mode output socket

        callable_output_socket = self.callable_output_socket = OutputSocket(
            node=self,
            type_codename=CALLABLE_CODENAME,
            output_name=CALLABLE_OUTPUT_NAME,
        )

        self.callable_output_sockets = (callable_output_socket,)

        ### gather all visual objects in the same
        ### collections

        self.signature_visual_objects = (
            body,
            label,
            signature_output_socket,
            *(socket for socket in signature_input_sockets),
        )

        ###

        self.callable_visual_objects = (
            body,
            label,
            callable_output_socket,
        )

        ### create rect representing entire node
        self.rect = Rect(0, 0, 0, 0)

        ### also create and store a rects managers to
        ### control all the rects in the node in different modes

        self.signature_rectsman = (
            RectsManager([obj.rect for obj in self.signature_visual_objects].__iter__)
        )

        self.callable_rectsman = (
            RectsManager([obj.rect for obj in self.callable_visual_objects].__iter__)
        )

        ### add self.rect to them

        for rectsman in (self.signature_rectsman, self.callable_rectsman):

            ## retrieve and use list's append method to add rect
            rectsman._get_all_rects.__self__.append(self.rect)

        ### pick tiny icon representing node
        self.pick_tiny_icon()
Create visual elements of the node.
nodezator/graphman/operatornode/vizprep.py