class_docstr: Call multiple callbacks at once.
class_docstr_tok: ["Call","multiple","callbacks","at","once","."]
docstr: Save the state of the callback list to the checkpoint_dir.
  
  Args:
      checkpoint_dir: directory where the checkpoint is stored.
      session_str: Unique identifier of the current run session (ex: timestamp).
docstr_tok: ["Save","the","state","of","the","callback","list","to","the","checkpoint_dir",".","Args",":","checkpoint_dir",":","directory","where","the","checkpoint","is","stored",".","session_str",":","Unique","identifier","of","the","current","run","session","(","ex",":","timestamp",")","."]
code: def save_to_dir(
      self, checkpoint_dir: str, session_str: str = "default"
  ):
      """Save the state of the callback list to the checkpoint_dir.
  
      Args:
          checkpoint_dir: directory where the checkpoint is stored.
          session_str: Unique identifier of the current run session (ex: timestamp).
      """
      state_dict = self.get_state()
  
      if state_dict:
          file_name = self.CKPT_FILE_TMPL.format(session_str)
          tmp_file_name = f".tmp-{file_name}"
          _atomic_save(
              state=state_dict,
              checkpoint_dir=checkpoint_dir,
              file_name=file_name,
              tmp_file_name=tmp_file_name,
          )
  
imports: from abc import ABCMeta
  import glob
  import os
  from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
  import warnings
  from ray.util.annotations import PublicAPI, DeveloperAPI
  from ray.tune.utils.util import _atomic_save, _load_newest_checkpoint
label_desc: Use image node_id 16 for calling the CallbackList obj's underlying member method code with example usage: obj.save_to_dir(checkpoint_dir, session_str) without return types