def METHOD_NAME(test_case):
    device = random_device()
    x = random_tensor().to(device)
    y = torch.flatten(
        x,
        start_dim=random(1, 6).to(int) | nothing(),
        end_dim=random(1, 6).to(int) | nothing(),
    )
    return y