def StoreWildcardCache(self):
    """Store a set of wildcard records."""
    timeout = self.health_timeout * SHARED_CACHE_TIMEOUT_MULTIPLIER
    attempted = []
    self.cache_checks = []

    while len(self.cache_checks) != TOTAL_WILDCARDS_TO_STORE:
      if len(attempted) == MAX_STORE_ATTEMPTS:
        self.DisableWithMessage('Unable to get uncached results for: %s' % ', '.join(attempted))
        return False
      domain = random.choice(WILDCARD_DOMAINS)
      hostname = 'namebench%s.%s' % (random.randint(1, 2**32), domain)
      attempted.append(hostname)
      response = self.TimedRequest('A', hostname, timeout=timeout)[0]
      if response and response.answer:
        self.cache_checks.append((hostname, response, self.timer()))
      else:
        sys.stdout.write('x')
dataset/ETHPy150Open catap/namebench/libnamebench/health_checks.py/NameServerHealthChecks.StoreWildcardCache/original