import torch


def unpack_episode(episode):
    """ Helper function that extracts samples and labels from an episode in numpy
    Args:
        episode: the episode to unpack
    """
    examples = torch.cat([episode["support_images"], episode["query_images"]], 1).numpy()
    labels = torch.cat([episode["support_class_labels"], episode["query_class_labels"]], 1).numpy()
    return examples, labels