nodes: 0, module; 1, function_definition; 2, function_name:_encrypted_data_keys_hash; 3, parameters; 4, block; 5, identifier:hasher; 6, identifier:encrypted_data_keys; 7, expression_statement; 8, expression_statement; 9, for_statement; 10, return_statement; 11, comment:"""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
      """; 12, assignment; 13, identifier:edk; 14, identifier:encrypted_data_keys; 15, block; 16, call; 17, identifier:hashed_keys; 18, list; 19, expression_statement; 20, expression_statement; 21, expression_statement; 22, expression_statement; 23, attribute; 24, argument_list; 25, assignment; 26, assignment; 27, call; 28, call; 29, string:b""; 30, identifier:join; 31, call; 32, identifier:serialized_edk; 33, call; 34, identifier:_hasher; 35, call; 36, attribute; 37, argument_list; 38, attribute; 39, argument_list; 40, identifier:sorted; 41, argument_list; 42, identifier:serialize_encrypted_data_key; 43, argument_list; 44, attribute; 45, argument_list; 46, identifier:_hasher; 47, identifier:update; 48, identifier:serialized_edk; 49, identifier:hashed_keys; 50, identifier:append; 51, call; 52, identifier:hashed_keys; 53, identifier:edk; 54, identifier:hasher; 55, identifier:copy; 56, attribute; 57, argument_list; 58, identifier:_hasher; 59, identifier:finalize
code: def _encrypted_data_keys_hash(hasher, encrypted_data_keys):
      """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
      """
      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))