def METHOD_NAME(
        self, N, G, D, H, W, epsilon, order, gc, dc):
    op = core.CreateOperator(
        "GroupNorm",
        ["X", "gamma", "beta"],
        ["Y", "mean", "inv_std"],
        group=G,
        epsilon=epsilon,
        order=order,
    )
    C = G * D
    if order == "NCHW":
        X = np.random.randn(N, C, H, W).astype(np.float32) + 1.0
    else:
        X = np.random.randn(N, H, W, C).astype(np.float32) + 1.0
    gamma = np.random.randn(C).astype(np.float32)
    beta = np.random.randn(C).astype(np.float32)
    inputs = [X, gamma, beta]
    def ref_op(X, gamma, beta):
        if order == "NCHW":
            return self.group_norm_nchw_ref(X, gamma, beta, G, epsilon)
        else:
            return self.group_norm_nhwc_ref(X, gamma, beta, G, epsilon)
    self.assertReferenceChecks(
        device_option=gc,
        op=op,
        inputs=inputs,
        reference=ref_op,
        threshold=5e-3,
    )
    self.assertDeviceChecks(dc, op, inputs, [0, 1, 2])