<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _connect_to_socket(self, context: zmq.Context, endpoint: str):
 """ Connect to a DEALER socket at endpoint and turn off lingering. :param context: ZMQ Context to use (potentially async) :param endpoint: Endpoint :return: Connected socket """

        socket = context.socket(zmq.DEALER)
        socket.connect(endpoint)
        socket.setsockopt(zmq.LINGER, 0)
        _log.debug("Client connected to endpoint %s", self.endpoint)
        return socket