<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def dispatch(self, event):
 """Given an event, send it to all the subscribers. Args event (:class:`~bigchaindb.events.EventTypes`):
 the event to dispatch to all the subscribers. """


        for event_types, queues in self.queues.items():
            if event.type & event_types:
                for queue in queues:
                    queue.put(event)