def METHOD_NAME(test_case):
    N = randint(1, 8)
    C = randint(1, 8)
    D = randint(1, 8)
    H = randint(1, 8)
    W = randint(1, 8)
    device = random_device()
    align_corners = choice([True, False])
    theta = random_tensor(ndim=3, dim0=N, dim1=3, dim2=4).to(device)
    output = torch.nn.functional.affine_grid(
        theta, (N, C, D, H, W), align_corners=align_corners
    ).to(device)
    return output