docstr: Return default factory for Optimizer (defaulting to Adam).
docstr_tok: ["Return","default","factory","for","Optimizer","(","defaulting","to","Adam",")","."]
code: def default(cls, **kwargs):
      """Return default factory for Optimizer (defaulting to Adam)."""
      return (
          cls(Adam=classes["Adam"]())
          if kwargs == {}
          else cls(Adam=classes["Adam"](**kwargs))
      )
  
file_path: ReAgent/reagent/optimizer/union.py
imports: import logging
  from typing import List
  import reagent.optimizer.uninferrable_optimizers
  import torch
  from reagent.core.configuration import make_config_class, param_hash
  from reagent.core.tagged_union import TaggedUnion
  from .optimizer import OptimizerConfig
  from .utils import is_torch_optimizer
label_desc: Use image node_id 1 for calling the Optimizer__Union obj's underlying member method code with example usage: obj.default(cls) and returns: unknown