    def step(self, closure=None, groups=None):
        """Performs a single optimization step.

        Args:
            closure (callable, optional): A closure that reevaluates the model
                and returns the loss.
        """
        loss = None
        if closure is not None:
            loss = closure()

        for k, opt in self.optimizers.items():
            if groups is None or k in groups:
                opt.step()

        return loss
Performs a single optimization step.

Args:
closure (callable, optional): A closure that reevaluates the model
and returns the loss.
fairseq/optim/composite.py