class_docstr: Defines the DataBalanceManager for finding data balance measures
  on a dataset.
class_docstr_tok: ["Defines","the","DataBalanceManager","for","finding","data","balance","measures","on","a","dataset","."]
docstr: Save the DataBalanceManager to the given path.
  
  :param path: The directory path to save the DataBalanceManager to.
  :type path: str
docstr_tok: ["Save","the","DataBalanceManager","to","the","given","path",".",":","param","path",":","The","directory","path","to","save","the","DataBalanceManager","to",".",":","type","path",":","str"]
code: def _save(self, path):
      """
      Save the DataBalanceManager to the given path.
  
      :param path: The directory path to save the DataBalanceManager to.
      :type path: str
      """
      top_dir = Path(path)
      top_dir.mkdir(parents=True, exist_ok=True)
  
      # If manager is not added to RAIInsights, don't save any of its configs
      if not self._is_added:
          return
  
      dir_manager = DirectoryManager(parent_directory_path=path)
      config_dir = dir_manager.create_config_directory()
  
      manager_path = config_dir / MANAGER_JSON
      with open(manager_path, "w") as f:
          json.dump(self.list(), f)
  
      # if measures have been computed, save the computed measures
      if self._data_balance_measures:
          measures_path = config_dir / MEASURES_JSON
          with open(measures_path, "w") as f:
              json.dump(self._data_balance_measures, f)
  
      data_path = dir_manager.create_data_directory() / DATA_JSON
      self._df.to_json(data_path, orient="split")
  
imports: import json
  import warnings
  from pathlib import Path
  from typing import Dict, List
  import numpy
  import pandas
  from responsibleai._interfaces import TaskType
  from responsibleai._internal.constants import DataBalanceManagerKeys
  from responsibleai._internal.constants import FileFormats, ListProperties, ManagerNames
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.databalanceanalysis import AggregateBalanceMeasures, DistributionBalanceMeasures, FeatureBalanceMeasures
  from responsibleai.databalanceanalysis.data_balance_utils import prepare_df, transform_measures_to_dict
  from responsibleai.managers.base_manager import BaseManager
label_desc: Use image node_id 10 for calling the DataBalanceManager obj's underlying member method code with example usage: obj._save(path) without return types