def METHOD_NAME(model_out: Tensor, target: int, named_tuple=False):
    _, pred = torch.max(model_out, dim=1)
    acc = (pred == target).float()
    output = model_out[:, target]
    if named_tuple:
        return ModelResult(
            accuracy=acc.item() if acc.numel() == 1 else acc,
            output=output.item() if output.numel() == 1 else output,
        )
    return (acc, output)