code: def prune_hashes(self, hashes, list_type):
          
          discarded = []
          for hash in hashes:
              if (hash in self.hashes):
                  self.hashes.discard(hash)
                  discarded.append(hash)
          self.logger.info("Not calculating %s hash(es) on destination as not present "
                           "in source %s list" % (', '.join(sorted(discarded)), list_type))
docs: Prune any hashes not in source resource or change list.