def send(self, messages, callback):

        sub = []
        for message in messages:
            m, v = message
            if m[-10:] == '.subscribe':
                sub.append(message)

        if sub:
            with self.lock:
                if self.subscriptions.get(callback) is None: 
                    self.subscriptions[callback] = []
                for message in sub:
                    if self.subscriptions[callback] not in message:
                        self.subscriptions[callback].append(message)

        if not self.is_connected: 
            print_error("interface: trying to send while not connected")
            return

        if self.protocol in 'st':
            with self.lock:
                out = self.send_tcp(messages, callback)
        else:
            # do not use lock, http is synchronous
            out = self.send_http(messages, callback)

        return out
dataset/ETHPy150Open bitxbay/BitXBay/electru/build/lib/electrum/interface.py/Interface.send/swapped operands of `not in`