<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def actually_start_agent(self, descriptor, **kwargs):
 """ This method will be run only on the master agency. """

        factory = IAgentFactory(
            applications.lookup_agent(descriptor.type_name))
        if factory.standalone:
            return self.start_standalone_agent(descriptor, factory, **kwargs)
        else:
            return self.start_agent_locally(descriptor, **kwargs)