def METHOD_NAME(test_case):
    device = random_device()
    x = random_tensor(4, requires_grad=False).to(device)
    y = torch.sum(
        x,
        dim=np.random.randint(0, 3),
        keepdim=random_bool(),
        dtype=random_dtype(["arithmetic"]),
    )
    return y