def METHOD_NAME(
    data, train_prop=0.7, batch_size=64, num_workers=4, shuffle=False, one_hot=False
):
    xs, ys = data
    if one_hot and ys.dtype != float:
        oh = np.zeros((ys.size, ys.max() + 1))
        oh[np.arange(ys.size), ys] = 1
        ys = oh
    dataset = TensorDataset(torch.FloatTensor(xs), torch.FloatTensor(ys))
    lens = [int(train_prop * len(xs))]
    lens += [len(xs) - lens[0]]
    train_dset, val_dset = torch.utils.data.random_split(dataset, lens)
    train_loader = DataLoader(
        train_dset,
        batch_size=min(batch_size, lens[0]),
        shuffle=shuffle,
        num_workers=num_workers,
    )
    val_loader = DataLoader(
        val_dset,
        batch_size=min(batch_size, lens[1]),
        num_workers=num_workers,
        shuffle=False,
    )
    return train_loader, val_loader, xs.shape[1], xs.shape[0]