import torch


def collate_embedding(batch):
    """
    unzip and merge list of torch.Tensor into single Tensor by stacking them
    """

    batch, indices = zip(*batch)

    return torch.stack(batch), indices