def METHOD_NAME():
    x = flow.nn.Parameter(flow.Tensor(init_value, device=flow.device(device)))
    optim_kwargs = {
        "params": [x],
        "lr": learning_rate,
        "betas": betas,
        "eps": eps,
        "weight_decay": weight_decay,
        "adam_w_mode": adam_w_mode,
        "do_bias_correction": do_bias_correction,
        "contiguous_params": contiguous_params,
    }
    if clip_grad_max_norm != -1:
        optim_kwargs["clip_grad_max_norm"] = clip_grad_max_norm
        optim_kwargs["clip_grad_norm_type"] = clip_grad_norm_type
    lamb = flow.optim.LAMB([optim_kwargs])
    def train_one_iter(grad):
        grad_tensor = flow.tensor(
            grad,
            dtype=flow.float32,
            requires_grad=False,
            device=flow.device(device),
        )
        loss = flow.sum(x * grad_tensor)
        loss.backward()
        if clip_grad_max_norm != -1:
            lamb.clip_grad()
        lamb.step()
        lamb.zero_grad()
    for i in range(train_iters):
        train_one_iter(random_grad_seq[i])
        if i == reload_state_step:
            state_dict = lamb.state_dict()
            lamb = flow.optim.LAMB([optim_kwargs])
            if save_load_by_pickle:
                with tempfile.NamedTemporaryFile() as f:
                    flow.save(state_dict, f.name)
                    state_dict = flow.load(f.name)
            lamb.load_state_dict(state_dict)
    return x