def METHOD_NAME(self, optimizer: Optimizer, checkpoint: str, gather_dtensor: bool):
    """
    Save optimizer to checkpoint but only on master process.
    """
    if self.coordinator.is_master():
        super().METHOD_NAME(optimizer, checkpoint, gather_dtensor)