@classmethod
def fromkeys(cls, keys, value=None):
    """Creates a new trie with given keys set.

        This is roughly equivalent to calling the constructor with a ``(key,
        value) for key in keys`` generator.

        Args:
            keys: An iterable of keys that should be set in the new trie.
            value: Value to associate with given keys.

        Returns:
            A new trie where each key from ``keys`` has been set to the given
            value.
        """
    trie = cls()
    for key in keys:
        trie[key] = value
    return trie
