def METHOD_NAME(flat, model):
    """Wrapper for :func:`_unflatten`.
    Args:
        flat (array): 1D array of items
        model (array, Iterable, Number): model nested structure
    Raises:
        ValueError: if ``flat`` has more elements than ``model``
    """
    # pylint:disable=len-as-condition
    res, tail = _unflatten(np.asarray(flat), model)
    if len(tail) != 0:
        raise ValueError("Flattened iterable has more elements than the model.")
    return res