docs: def random_filtered_sources(sources, srcfilter, seed):
      """
      :param sources: a list of sources
      :param srcfilte: a SourceFilter instance
      :param seed: a random seed
      :returns: an empty list or a list with a single filtered source
      """
      random.seed(seed)
      while sources:
          src = random.choice(sources)
          if srcfilter.get_close_sites(src) is not None:
              return [src]
          sources.remove(src)
      return []