def METHOD_NAME(
    net: nn.Module, dataloader: DataLoader, device: torch.device
) -> Tuple[float, float]:
    """Test - calculate metrics on the given dataloader."""
    criterion = torch.nn.CrossEntropyLoss(reduction="sum")
    if len(dataloader) == 0:
        raise ValueError("Dataloader can't be 0, exiting...")
    correct, total, loss = 0, 0, 0.0
    net.eval()
    with torch.no_grad():
        for images, labels in dataloader:
            images, labels = images.to(device), labels.to(device)
            output = net(images)
            loss += criterion(output, labels).item()
            _, predicted = output.max(1)
            total += labels.size(0)
            correct += predicted.eq(labels).sum().item()
        accuracy = correct / total
        loss /= total
    return float(loss), accuracy