code: def prepareList(self, listFile=False, noSample=False):
          
  
          logging.debug("Loading resolver file")
  
          listFileLocation = self.listLocal if not listFile else listFile
  
          # Resolve the user part of the path
          listLocal = os.path.expanduser(listFileLocation)
  
          # Check local file location exists and is writable
          assert os.path.isdir(os.path.dirname(listLocal)),\
              "{0} is not a directory!".format(os.path.dirname(listLocal))
          assert os.access(os.path.dirname(listLocal), os.W_OK),\
              "{0} is not writable!".format(os.path.dirname(listLocal))
  
          # Open and yaml parse the resolver list
          with open(listLocal) as ll:
              raw = ll.read()
              # Use safe_load, just to be safe.
              serverList = yaml.safe_load(raw)
  
          # Remove all but the specified countries from the server list
          if self.country is not None:
              logging.debug("Filtering serverList for country {0}"
                            .format(self.country))
  
              serverList = [d for d in serverList
                            if d['country'] == self.country]
  
              if len(serverList) == 0:
                  raise ValueError("There are no servers avaliable "
                                   "with the country code {0}"
                                   .format(self.country))
  
          # Get selected number of servers
          if self.maxServers == 'ALL' or noSample:
              # Set servers to the number of servers we have
              self.maxServers = len(serverList)
          elif self.maxServers > len(serverList):
              # We were asked for more servers than exist in the list
              logging.warning(
                  "You asked me to query {0} servers, but I only have "
                  "{1} servers in my serverlist".format(
                      self.maxServers,
                      len(serverList)
                  )
              )
  
              # Fallback to setting it to all
              self.maxServers = len(serverList)
  
          # Get a random selection of the specified number
          # of servers from the list
          self.serverList = random.sample(serverList, self.maxServers)
  
          return self.serverList
docs: Load and filter the server list for only the servers we care about