code: def _validate_entries(self, processes, callback=None):
          
          errors = list()
  
          if os.name == 'posix':
              worker_init = posix_multiprocessing_worker_initializer
          else:
              worker_init = None
  
          args = ((self.path,
                   self.normalized_filesystem_names.get(rel_path, rel_path),
                   hashes,
                   self.algorithms) for rel_path, hashes in self.entries.items())
  
          try:
              if processes == 1:
                  count = 0
                  hash_results = []
                  totalHashes = len(self.entries.items())
                  for i in args:
                      hash_results.append(_calc_hashes(i))
                      count += 1
                      if callback:
                          if not callback(count, totalHashes):
                              raise BaggingInterruptedError("Bag validation interrupted!")
  
              else:
                  pool = None
                  try:
                      pool = multiprocessing.Pool(processes if processes else None, initializer=worker_init)
                      hash_results = pool.map(_calc_hashes, args)
                  finally:
                      if pool:
                          pool.terminate()
          except BaggingInterruptedError:
              raise
          # Any unhandled exceptions are probably fatal
          except:
              LOGGER.error(_("Unable to calculate file hashes for %s"), self)
              raise
  
          for rel_path, f_hashes, hashes in hash_results:
              for alg, computed_hash in f_hashes.items():
                  stored_hash = hashes[alg]
                  if stored_hash.lower() != computed_hash:
                      e = ChecksumMismatch(rel_path, alg, stored_hash.lower(), computed_hash)
                      LOGGER.warning(force_unicode(e))
                      errors.append(e)
  
          if errors:
              raise BagValidationError(_("Bag validation failed"), errors)
docs: Verify that the actual file contents match the recorded hashes stored in the manifest files