import torch


def _collate_fn_tensor(x):
    """ Collate function for tensors.

    Parameters
    ----------
    x : `List` of `torch.Tensor`
        Tensors to be stacked.

    Returns
    -------
    x : `torch.Tensor`
        Output tensor.
    """
    return torch.stack(x)