def register(self, listener, *types):
        count = 0
        for messagetype in types:
            key = maybeName(messagetype)
            listeners = self.listeners.setdefault(key, [])
            if listener not in listeners:
                listeners.append(listener)
                count += 1
        return count > 0
Associate listener with message types created by this Dispatcher.
dataset/ETHPy150Open CarterBain/Medici/ib/opt/dispatcher.py/Dispatcher.register