class_docstr: Base class for training strategies.
class_docstr_tok: ["Base","class","for","training","strategies","."]
code: def save_optimizer(
      self,
      optimizer: Optimizer,
      path: str,
      only_rank0: bool = False,
      **kwargs,
  ) -> None:
      self.booster.save_optimizer(
          optimizer, path, shard=not only_rank0, **kwargs
      )
  
imports: from abc import ABC, abstractmethod
  from contextlib import nullcontext
  from typing import Callable, Dict, List, Optional, Tuple, Union
  import torch
  import torch.nn
  from coati.experience_buffer import ExperienceBuffer
  from torch.optim import Optimizer
  from torch.utils.data import DataLoader
  from transformers.tokenization_utils_base import PreTrainedTokenizerBase
  from colossalai.booster import Booster
  from colossalai.booster.plugin import Plugin
  from .sampler import DistributedSampler
label_desc: Use image node_id 12 for calling the Strategy obj's underlying member method code with example usage: obj.save_optimizer(optimizer, path, only_rank0) without return types