nit: just do

channel_ids = channel_ids if channel_ids else known_language_channels.keys()

and then combine the two branches?