human
Solve the following python programming problem given the following code:
@ logging.log_task_wrapper (LOG.info, _ ('Enter context: `custom_image`')) 
def setup(self) : 
    'Creates custom image(s) with preinstalled applications.

        When admin is present creates one public image that is usable
        from all the tenants and users. Otherwise create one image
        per user and tenant.
        ' 
    if ('admin' in self.context) : 
        user = self.context ['users'] [0] 
        tenant = self.context ['tenants'] [user ['tenant_id']] 
        nics = None 
        if ('networks' in consume) : 
            nics = [{ 
                'net-id' : tenant ['networks'] [0] ['id'], 
}] 
custom_image = self.create_one_image (user, nics = nics) 
        self.make_image_public (custom_image) 
        for tenant in self.context ['tenants'].values () : 
            tenant ['custom_image'] = custom_image 
else : 
        def publish(queue) : 
            users = self.context.get ('users', []) 
            for (user, tenant_id) in utils.iterate_per_tenants (users) : 
                queue.append ((user, tenant_id)) 
def consume(cache, args) : 
            (user, tenant_id) = args 
            tenant = self.context ['tenants'] [tenant_id] 
            tenant ['custom_image'] = self.create_one_image (user) 
broker.run (publish, consume, self.config ['workers']) 

    
    

    Fix the buggy line: if ('networks' in consume) :
assistant
#Here is Python program to fix the buggy line: if ('networks' in consume) :
.

if ('networks' in tenant) :