def METHOD_NAME(cls, packed_tensor, lengths):
    assert False, "This seems to be incorrect but I can't see why. Is it the inner_dims in the views?"
    packed_tensor, lengths = packed_tensor.cuda().contiguous(), lengths.cuda()
    inner_dims = packed_tensor.size()[1:]
    stride = lengths.max().item()
    offsets = torch.cumsum(lengths, dim=0) - lengths[0]
    padding = torch.zeros(stride, *inner_dims, device=packed_tensor.device, dtype=packed_tensor.dtype)
    packed_tensor = torch.cat((packed_tensor, padding))
    view = _create_view(packed_tensor, stride, inner_dims)[offsets]
    mask = _create_mask(lengths, stride, like=view)
    return view, mask