code: def _encrypted_data_keys_hash(hasher, encrypted_data_keys):
      
      hashed_keys = []
      for edk in encrypted_data_keys:
          serialized_edk = serialize_encrypted_data_key(edk)
          _hasher = hasher.copy()
          _hasher.update(serialized_edk)
          hashed_keys.append(_hasher.finalize())
      return b"".join(sorted(hashed_keys))
docs: Generates the expected hash for the provided encrypted data keys.
  
      :param hasher: Existing hasher to use
      :type hasher: cryptography.hazmat.primitives.hashes.Hash
      :param iterable encrypted_data_keys: Encrypted data keys to hash
      :returns: Concatenated, sorted, list of all hashes
      :rtype: bytes