def tree_unflatten(cls, aux_data: Any, children: Sequence[Any]) -> Struct:
    """Unflattens this tree node.

    See `jax.tree_util.register_pytree_with_keys_class`.

    This method should not be overridden by subclasses, since
    struct-manipulation code should be able to rely on this implementation. If
    you must override this for an advanced use case, consider using
    `pytree_dataclass` without subclassing `Struct`.

    Args:
      aux_data: Auxiliary data, returned from the second argument of
        `tree_flatten_with_keys` (or `tree_flatten`).
      children: Sequence of children from the first argument of
        `tree_flatten_with_keys` (or `tree_flatten`).

    Returns:
      An instance of the struct.
    """
    assert isinstance(aux_data, StructStaticMetadata)
    attributes = dict(aux_data.static_fields)
    assert len(children) == len(aux_data.child_field_names)
    for name, child in zip(aux_data.child_field_names, children):
      attributes[name] = child
    return cls.from_attributes(**attributes)
Unflattens this tree node.

    See `jax.tree_util.register_pytree_with_keys_class`.

    This method should not be overridden by subclasses, since
    struct-manipulation code should be able to rely on this implementation. If
    you must override this for an advanced use case, consider using
    `pytree_dataclass` without subclassing `Struct`.

    Args:
      aux_data: Auxiliary data, returned from the second argument of
        `tree_flatten_with_keys` (or `tree_flatten`).
      children: Sequence of children from the first argument of
        `tree_flatten_with_keys` (or `tree_flatten`).

    Returns:
      An instance of the struct.
    
penzai/core/struct.py