def METHOD_NAME(
    input,
    group,
    running_mean=None,
    running_var=None,
    weight=None,
    bias=None,
    use_input_stats=None,
    momentum=None,
    eps=None,
):
    # Repeat stored stats and affine transform params if necessary
    if running_mean is not None:
        running_mean_orig = running_mean
        running_mean = running_mean_orig.repeat(b)
    if running_var is not None:
        running_var_orig = running_var
        running_var = running_var_orig.repeat(b)
    # norm_shape = [1, b * c / group, group]
    # print(norm_shape)
    # Apply instance norm
    input_reshaped = input.contiguous().view(
        1, int(b * c / group), group, *input.size()[2:]
    )
    out = F.batch_norm(
        input_reshaped,
        running_mean,
        running_var,
        weight=weight,
        bias=bias,
        training=use_input_stats,
        momentum=momentum,
        eps=eps,
    )
    # Reshape back
    if running_mean is not None:
        running_mean_orig.copy_(
            running_mean.view(b, int(c / group)).mean(0, keepdim=False)
        )
    if running_var is not None:
        running_var_orig.copy_(
            running_var.view(b, int(c / group)).mean(0, keepdim=False)
        )
    return out.view(b, c, *input.size()[2:])