'Setup the hidden seeder. This includes setting the right circuit parameters, creating the download callback and
waiting for the creation of an introduction point for the download.'

def configure_hidden_seeder(self):

    def download_states_callback(dslist):
        self.tunnel_community_seeder.monitor_downloads(dslist)
        return []
    self.tunnel_community_seeder.settings.min_circuits = 0
    self.tunnel_community_seeder.settings.max_circuits = 0
    self.session2.config.set_anon_proxy_settings(2, ('127.0.0.1', self.session2.config.get_tunnel_community_socks5_listen_ports()))
    self.session2.set_download_states_callback(download_states_callback)
    def dht_announce(info_hash, community):
        def cb_dht(info_hash, peers, source):
            self._logger.debug('announced    %s    to    the    DHT', info_hash.encode('hex'))
            self.dht_deferred.callback(None)
        port = community.tribler_session.config.get_dispersy_port()
        if (not community.tribler_session.lm.mainline_dht):
            community.tribler_session.lm.mainline_dht = FakeDHT(self.dht_dict)
        community.tribler_session.lm.mainline_dht.get_peers(info_hash, Id(info_hash), cb_dht, bt_port=port)
    for community in self.tunnel_communities:
        community.dht_announce = (lambda ih, com=community: dht_announce(ih, com))
        community.settings.dht_lookup_interval = 0
    return self.dht_deferred
