def METHOD_NAME(self, train_conf, vars_conf):
    new_opt_confs = []
    for param_group in self.param_groups:
        assert (
            param_group["contiguous_params"] != True
        ), "contiguous_params cannot be used in graph"
        optimizer_conf = train_conf.optimizer_conf.add()
        lr = (
            param_group["initial_lr"]
            if "initial_lr" in param_group
            else param_group["lr"]
        )
        l2 = param_group["weight_decay"]
        initial_accumulator_value = param_group["initial_accumulator_value"]
        lr_decay = param_group["lr_decay"]
        epsilon = param_group["eps"]
        optimizer_conf.base_learning_rate = lr
        self._generate_lr_scale_for_optim_conf(param_group, optimizer_conf)
        optimizer_conf.adagrad_conf.initial_accumulator_value = (
            initial_accumulator_value
        )
        optimizer_conf.adagrad_conf.lr_decay = lr_decay
        optimizer_conf.adagrad_conf.epsilon = epsilon
        self._generate_grad_clip_conf_for_optim_conf(param_group, optimizer_conf)
        for param in param_group.parameters:
            vars_conf[param].l2 = l2
            if param.requires_grad:
                optimizer_conf.variable_op_names.append(vars_conf[param].name)
        new_opt_confs.append(optimizer_conf)
    return new_opt_confs