def build_optimizer(cls, cfg: DictConfig, params, **kwargs):
        """
        Args:
            args (argparse.Namespace): fairseq args
            params (iterable): iterable of parameters to optimize
        """
        fp16_optimizer = optim.build_optimizer(cfg.optimizer, params)
        return cls(cfg, params, fp16_optimizer, **kwargs)

        Args:
            args (argparse.Namespace): fairseq args
            params (iterable): iterable of parameters to optimize
        
understand_icl/fairseq/fairseq/optim/fp16_optimizer.py