def default_uncollate(batch: Any) -> List[Any]:
    """This function is used to uncollate a batch into samples. The following conditions are used:

    - if the ``batch`` is a ``dict``, the result will be a list of dicts
    - if the ``batch`` is list-like, the result is guaranteed to be a list

    Args:
        batch: The batch of outputs to be uncollated.

    Returns:
        The uncollated list of predictions.

    Raises:
        ValueError: If the input is a ``dict`` whose values are not all list-like.
        ValueError: If the input is a ``dict`` whose values are not all the same length.
        ValueError: If the input is not a ``dict`` or list-like.

    """
    if isinstance(batch, dict):
        if any(not _is_list_like_excluding_str(sub_batch) for sub_batch in batch.values()):
            raise ValueError("When uncollating a dict, all sub-batches (values) are expected to be list-like.")
        if len({len(sub_batch) for sub_batch in batch.values()}) > 1:
            raise ValueError("When uncollating a dict, all sub-batches (values) are expected to have the same length.")
        elements = [default_uncollate(element) for element in zip(*batch.values())]
        return [dict(zip(batch.keys(), element)) for element in elements]
    if isinstance(batch, (list, tuple, Tensor)):
        return list(batch)
    raise ValueError(
        "The batch of outputs to be uncollated is expected to be a `dict` or list-like "
        f"(e.g. `Tensor`, `list`, `tuple`, etc.), but got input of type: {type(batch)}"
    )
This function is used to uncollate a batch into samples. The following conditions are used:

    - if the ``batch`` is a ``dict``, the result will be a list of dicts
    - if the ``batch`` is list-like, the result is guaranteed to be a list

    Args:
        batch: The batch of outputs to be uncollated.

    Returns:
        The uncollated list of predictions.

    Raises:
        ValueError: If the input is a ``dict`` whose values are not all list-like.
        ValueError: If the input is a ``dict`` whose values are not all the same length.
        ValueError: If the input is not a ``dict`` or list-like.

    
src/flash/core/data/batch.py