def METHOD_NAME(param_list, param_getter, center=True, scale=True):
  #order: gamma,beta,mean,var
  if all(param_getter(p) is not None for p in param_list):
    param_shape = param_getter(param_list[-1]).shape
    bn_params = []
    if center and scale:
      bn_params = [param_getter(p) for p in param_list]
    elif center:
      bn_params = [np.ones(param_shape),
                   param_getter(param_list[0])
                  ] + [param_getter(p) for p in param_list[-2:]]
    elif scale:
      bn_params = [param_getter(node.op.params[0]),
                   np.zeros(param_shape)
                  ] + [param_getter(p) for p in param_list[-2:]]
    if len(bn_params) == 2:
      #no mean and var
      bn_params.extend([np.zeros(param_shape), np.ones(param_shape)])
  else:
    bn_params = [None] * 4
  assert len(
      bn_params
  ) == 4, "batch norm should has 4 variables: gamma, beta, mean, var, please check!"
  return bn_params