class_docstr: Defines the CounterfactualManager for generating counterfactuals
  from a model.
class_docstr_tok: ["Defines","the","CounterfactualManager","for","generating","counterfactuals","from","a","model","."]
docstr: Return computed counterfactual examples objects or failure reason.
  
  :param failed_to_compute: Get the failure reasons if counterfactual
                            examples failed to compute.
  :type failed_to_compute: Optional[bool]
code: def get(self, failed_to_compute=False):
      """Return computed counterfactual examples objects or failure reason.
  
      :param failed_to_compute: Get the failure reasons if counterfactual
                                examples failed to compute.
      :type failed_to_compute: Optional[bool]
      """
      if not failed_to_compute:
          counterfactual_obj_list = []
          for counterfactual_config in self._counterfactual_config_list:
              if (
                  counterfactual_config.is_computed
                  and not counterfactual_config.has_computation_failed
              ):
                  counterfactual_obj_list.append(
                      counterfactual_config.counterfactual_obj
                  )
          return counterfactual_obj_list
      else:
          failure_reason_list = []
          for counterfactual_config in self._counterfactual_config_list:
              if (
                  counterfactual_config.is_computed
                  and counterfactual_config.has_computation_failed
              ):
                  failure_reason_list.append(
                      counterfactual_config.failure_reason
                  )
          return failure_reason_list
  
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 7 for calling the CounterfactualManager obj's underlying member method code with example usage: obj.get(failed_to_compute) and returns: counterfactual_obj_list, failure_reason_list