import io
import torch


def _deserialize(serialized: bytes):
    """
    Deserializes from bytes using PyTorch's
    serialization tools.

    Args:
        serialized (bytes): The data as bytes.

    Returns:
        Any: The original data
    """
    buff = io.BytesIO()
    buff.write(serialized)
    buff.seek(0)
    return torch.load(buff)