pub fn with_hasher(
        hasher: H,
        leaves: impl Iterator<Item = L>,
        min_tree_size: Option<usize>,
    ) -> Self {
        let hashes: Vec<_> = leaves
            .map(|bytes| hasher.hash_bytes(bytes.as_ref()))
            .collect();
        Self::from_hashes(hasher, hashes.into_iter(), min_tree_size)
    }
Creates a new Merkle tree from the supplied leaves. If `min_tree_size` is supplied and is larger than the
number of the supplied leaves, the leaves are padded to `min_tree_size` with `[0_u8; LEAF_SIZE]` entries,
but are deemed empty.

# Panics

Panics if any of the following conditions applies:

- `min_tree_size` (if supplied) is not a power of 2.
- The number of leaves is greater than `2^32`.
core/lib/mini_merkle_tree/src/lib.rs