def get_exchange(conn):
 ex = copy(event_exchange)
 if (conn.transport.driver_type == u'redis'):
  ex.type = u'fanout'
 return ex

def get_exchange ( conn ) : ex = copy ( event_exchange ) if ( conn . transport . driver_type == u'redis' ) : ex . type = u'fanout' return ex
get exchange used for sending events .