def METHOD_NAME(
        self, size, input_channels, batch_size, seed, order, epsilon,
        gc, dc):
    op = core.CreateOperator(
        "SpatialBN",
        ["X", "scale", "bias", "mean", "var"],
        ["Y", "mean", "var", "saved_mean", "saved_var"],
        order=order,
        is_test=False,
        epsilon=epsilon,
    )
    np.random.seed(seed)
    scale = np.random.rand(input_channels).astype(np.float32) + 0.5
    bias = np.random.rand(input_channels).astype(np.float32) - 0.5
    mean = np.random.randn(input_channels).astype(np.float32)
    var = np.random.rand(input_channels).astype(np.float32) + 0.5
    X = np.random.rand(
        batch_size, input_channels, size, size).astype(np.float32) - 0.5
    if order == "NHWC":
        X = X.swapaxes(1, 2).swapaxes(2, 3)
    for input_to_check in [0, 1, 2]:  # dX, dScale, dBias
        self.assertGradientChecks(gc, op, [X, scale, bias, mean, var],
                                  input_to_check, [0])