<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 async def connect(self, options: str) -> str: """ Connect securely and privately to the endpoint represented by the object. :param options: detailed connection options Example options: {"connection_type":"SMS","phone":"5555555555","use_public_did":true} or: {"connection_type":"QR"} Example code: connection = await Connection.create('Sally') invite_details = await connection.connect('{"connection_type":"QR"}') :return: the invite details sent via SMS or ready to be sent via some other mechanism (QR for example) """

        if not hasattr(Connection.connect, "cb"):
            self.logger.debug("vcx_connection_connect: Creating callback")
            Connection.connect.cb = create_cb(CFUNCTYPE(None, c_uint32, c_uint32, c_char_p))

        c_connection_handle = c_uint32(self.handle)
        c_connection_data = c_char_p(options.encode('utf-8'))
        invite_details = await do_call('vcx_connection_connect',
                                       c_connection_handle,
                                       c_connection_data,
                                       Connection.connect.cb)
        return invite_details