code: def host_agent_call(self, _method, *args, **kwargs):
          '''Public method exposed to all the agency submodules, which need
          to call the method on the host agent.
          This works regardless if host agent already running or not. If
          it is still being started the method will be called when he is ready.
          '''
          d = defer.Deferred()
          self._pending_host_agent_calls.append((_method, args, kwargs, d))
          self._flush_pending_host_agent_calls()
          return f host_agent_call(self, _method, *args, **kwargs):
          '''Public method exposed to all the agency submodules, which need
          to call the method on the host agent.
          This works regardless if host agent already running or not. If
          it is still being started the method will be called when he is ready.
          '''
          d = defer.Deferred()
          self._pending_host_agent_calls.append((_method, args, kwargs, d))
          self._flush_pending_host_agent_calls()
          return d
docs: Public method exposed to all the agency submodules, which need
          to call the method on the host agent.
          This works regardless if host agent already running or not. If
          it is still being started the method will be called when he is ready.