<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def prune_hashes(self, hashes, list_type):
 """Prune any hashes not in source resource or change list."""

        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))