code: def __init__(
      self,
      params: List[Tensor],
      lr: float = 1e-2,
      lr_decay: float = 0.0,
      weight_decay: float = 0.0,
      initial_accumulator_value: float = 0.0,
      warmup_lr_multiplier: float = 1.0,
      warmup_num_iters: float = 0.0,
      eps: float = 1e-10,
      coalesce_grad: bool = True,
      foreach: bool = False,
      maximize: bool = False,
      _allow_empty_param_list: bool = False,
  ):
      self.defaults = {
          "lr": lr,
          "lr_decay": lr_decay,
          "eps": eps,
          "weight_decay": weight_decay,
          "initial_accumulator_value": initial_accumulator_value,
          "warmup_lr_multiplier": warmup_lr_multiplier,
          "warmup_num_iters": warmup_num_iters,
      }
      self.coalesce_grad = coalesce_grad
      self.foreach = foreach
      self.maximize = maximize
      self.state = torch.jit.annotate(
          Dict[torch.Tensor, Dict[str, torch.Tensor]], {}
      )
  
      if len(params) == 0 and not _allow_empty_param_list:
          raise ValueError("optimizer got an empty parameter list")
  
      # NOTE: we only have one param_group and don't allow user to add additional
      # param group as it's not a common use case.
      self.param_group = {"params": params}
  
      # TODO: no union or any types in TorchScript, make step a scalar tensor instead
      # This is also needed by if we want to share_memory on the step across processes
      for p in self.param_group["params"]:
          self.state[p] = {
              "sum": torch.full_like(p.data, initial_accumulator_value),
              "step": torch.tensor(0.0),
          }
  
imports: from typing import Dict, List, Optional
  import torch
  import torch.optim._functional
  from torch import Tensor
label_desc: Use image node_id 1 to create a new _FunctionalAdagrad object  with example: obj = _FunctionalAdagrad(params, lr, lr_decay, weight_decay, initial_accumulator_value, warmup_lr_multiplier, warmup_num_iters, eps, coalesce_grad, foreach, maximize, _allow_empty_param_list)