Gives medium class of the agent if the agency hosts it.

def find_agent(self, desc):
        '''Gives medium class of the agent if the agency hosts it.'''
        agent_id = (desc.doc_id
                    if IDocument.providedBy(desc)
                    else desc)
        self.log("I'm trying to find the agent with id: %s", agent_id)
        result = first(x for x in self._agents
                       if x._descriptor.doc_id == agent_id)
        return defer.succeed(result)