def resume_defining_segment(self):
        """Resume definition of new line segment.

        Parameters
        ==========
        socket_b (reference to socket instance)
            reference of socket to where line is being
            defined.
        """
        ### reference sockets a and b locally and delete the respective
        ### attributes
        ### attribute

        socket_a, socket_b = self.socket_a, self.socket_b
        del self.socket_a, self.socket_b

        ### the output socket must be the socket at the
        ### left (socket_a), so swap places if needed
        ### (this is ok even if both sockets are output
        ### sockets)

        if isinstance(socket_b, OutputSocket):
            socket_a, socket_b = socket_b, socket_a

        ### establish segment line segment if it validates

        try:
            self.validate_line_segment(socket_a, socket_b)

        except (TypeError, ValueError) as err:
            print(err)

        else:

            ## if socket_b has a parent, sever the segment
            ## between them since after this we're about to
            ## establish a new one

            try:
                parent = socket_b.parent

            except AttributeError:
                pass

            else:

                self.sever_segment_between_sockets(
                    parent,
                    socket_b,
                    signal_child=False,
                )

                self.signal_severance_of_removed_sockets()

            ## check whether socket_b has a
            ## 'get_input_socket' method
            try:
                get_input_socket = socket_b.get_input_socket

            ## if it doesn't have one, just pass
            except AttributeError:
                pass

            ## if it has, though, it is a placeholder
            ## socket, so use the retrieved method to
            ## obtain an input socket to replace it
            else:
                socket_b = get_input_socket()

            ### you can now safely establish a new line
            ### segment between the two sockets
            self.establish_segment(socket_a, socket_b)

            ### also, indicate that changes were made to the data and
            ### that the birdseye view state of window manager must have its
            ### objects updated next time it is set

            indicate_unsaved()
            APP_REFS.ea.must_update_birdseye_view_objects = True

        ### change window manager state to the loaded
        ### file state
        APP_REFS.wm.set_state("loaded_file")

        ### restart the loop
        raise ContinueLoopException
Resume definition of new line segment.

        Parameters
        ==========
        socket_b (reference to socket instance)
            reference of socket to where line is being
            defined.
        
nodezator/graphman/socketparenthood/action.py