def METHOD_NAME(self):
    """
    Returns a dict containing the current state of this :class:`FP16_Optimizer` instance.
    This dict contains attributes of :class:`FP16_Optimizer`, as well as the state_dict
    of the contained Pytorch optimizer.
    Example::
        checkpoint = {}
        checkpoint['model'] = model.state_dict()
        checkpoint['optimizer'] = optimizer.state_dict()
        torch.save(checkpoint, "saved.pth")
    """
    METHOD_NAME = {}
    METHOD_NAME['dynamic_loss_scale'] = self.dynamic_loss_scale
    METHOD_NAME['cur_scale'] = self.cur_scale
    METHOD_NAME['cur_iter'] = self.cur_iter
    if METHOD_NAME['dynamic_loss_scale']:
        METHOD_NAME['last_overflow_iter'] = self.last_overflow_iter
        METHOD_NAME['scale_factor'] = self.scale_factor
        METHOD_NAME['scale_window'] = self.scale_window
    METHOD_NAME['optimizer_state_dict'] = self.optimizer.METHOD_NAME()
    METHOD_NAME['fp32_groups_flat'] = self.fp32_groups_flat
    return METHOD_NAME