def METHOD_NAME(test_case):
    device = random_device()
    channel = random(1, 4).to(int)
    m = torch.nn.BatchNorm2d(
        num_features=channel,
        track_running_stats=random().to(bool),
        affine=random().to(bool),
    ).to(device)
    m.train(random())
    m.half()
    x = random_tensor(
        ndim=4, dim0=random(1, 4), dim1=channel, requires_grad=True
    ).to(device)
    x.half()
    y = m(x)
    return y