class_docstr: Defines the configuration for generating counterfactuals.
class_docstr_tok: ["Defines","the","configuration","for","generating","counterfactuals","."]
docstr: Returns the dictionary representation of result of the computation
     in the CounterfactualConfig.
  
  :param include_counterfactual_obj: Whether to include serialized
                                     version of counterfactual object.
  :type method: bool
  :return: The dictionary representation of result in the
           CounterfactualConfig.
  :rtype: dict
code: def get_result(self, include_counterfactual_obj=True):
      """Returns the dictionary representation of result of the computation
         in the CounterfactualConfig.
  
      :param include_counterfactual_obj: Whether to include serialized
                                         version of counterfactual object.
      :type method: bool
      :return: The dictionary representation of result in the
               CounterfactualConfig.
      :rtype: dict
      """
      result = {}
      if include_counterfactual_obj:
          if self.counterfactual_obj is not None:
              result[
                  CounterfactualConfig.COUNTERFACTUAL_OBJ
              ] = self.counterfactual_obj.to_json()
          else:
              result[CounterfactualConfig.COUNTERFACTUAL_OBJ] = None
  
      result[
          CounterfactualConfig.HAS_COMPUTATION_FAILED
      ] = self.has_computation_failed
      result[CounterfactualConfig.FAILURE_REASON] = self.failure_reason
      result[CounterfactualConfig.IS_COMPUTED] = self.is_computed
  
      return result
  
imports: import json
  import uuid
  import warnings
  from pathlib import Path
  from typing import Any, List, Optional, Union
  import dice_ml
  import jsonschema
  import numpy
  import pandas
  from dice_ml import Dice
  from dice_ml.counterfactual_explanations import CounterfactualExplanations
  from dice_ml.explainer_interfaces.explainer_base import ExplainerBase
  from raiutils.exceptions import UserConfigValidationException
  from raiutils.models import ModelTask
  from responsibleai._config.base_config import BaseConfig
  from responsibleai._data_validations import validate_train_test_categories
  from responsibleai._interfaces import CounterfactualData
  from responsibleai._internal.constants import CounterfactualManagerKeys, FileFormats, ListProperties, ManagerNames
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.exceptions import DuplicateManagerConfigException, SchemaErrorException
  from responsibleai.managers.base_manager import BaseManager
  from responsibleai.utils import _find_features_having_missing_values, _measure_time
label_desc: Use image node_id 6 for calling the CounterfactualConfig obj's underlying member method code with example usage: obj.get_result(include_counterfactual_obj) and returns: result