
def get_chan(channels, chan):
    channels.setdefault(chan['name'], {'producers': [], 'consumers': [], 'data': chan})


def get_chan(channels, chan):
    return channels.setdefault(chan['name'], {'producers': [], 'consumers': [], 'data': chan})

Fix get_chan (which should return the channel)
Fix get_chan (which should return the channel)
