code: def hash_full_tree(self, leaves):
          
          root_hash, hashes = self._hash_full(leaves, 0, len(leaves))
          assert len(hashes) == count_bits_set(len(leaves))
          assert (self._hash_fold(hashes) == root_hash if hashes else
                  root_hash == self.hash_empty())
          return root_hash
docs: Hash a set of leaves representing a valid full tree.