class_docstr: Manager for generating causal analyses from a dataset.
class_docstr_tok: ["Manager","for","generating","causal","analyses","from","a","dataset","."]
docstr: Get local causal effects for a given data point.
  
  :param id: The query id for finding the
             causal config.
  :type id: str
  :param X_test: The data for which the local causal effects
                 needs to be generated for a given point.
  :type X_test: Any
  :return: An object of type CausalData with
           causal effects for a given point.
  :rtype: CausalData
docstr_tok: ["Get","local","causal","effects","for","a","given","data","point",".",":","param","id",":","The","query","id","for","finding","the","causal","config",".",":","type","id",":","str",":","param","X_test",":","The","data","for","which","the","local","causal","effects","needs","to","be","generated","for","a","given","point",".",":","type","X_test",":","Any",":","return",":","An","object","of","type","CausalData","with","causal","effects","for","a","given","point",".",":","rtype",":","CausalData"]
code: def request_local_instance_effects(self, id, X_test):
      """Get local causal effects for a given data point.
  
      :param id: The query id for finding the
                 causal config.
      :type id: str
      :param X_test: The data for which the local causal effects
                     needs to be generated for a given point.
      :type X_test: Any
      :return: An object of type CausalData with
               causal effects for a given point.
      :rtype: CausalData
      """
      filtered = [r for r in self.get() if r.id == id]
  
      if len(filtered) == 0:
          raise ValueError(
              f"Failed to find causal result with ID: {id}"
          )
  
      if not isinstance(X_test, pd.DataFrame):
          raise UserConfigValidationException(
              "Data is of type {0} but it must be "
              "a pandas DataFrame.".format(type(X_test))
          )
  
      if X_test.shape[0] > 1:
          raise UserConfigValidationException(
              "Only one row of data is allowed for "
              "local causal effects."
          )
  
      result = filtered[0]
      return result._local_instance_effects(X_test)
  
imports: from pathlib import Path
  from typing import Any, List, Optional, Union
  import numpy
  import pandas
  from econml.solutions.causal_analysis import CausalAnalysis
  from raiutils.exceptions import UserConfigValidationException
  from raiutils.models import ModelTask
  from responsibleai._data_validations import validate_train_test_categories
  from responsibleai._internal.constants import CausalManagerKeys, ListProperties, ManagerNames
  from responsibleai._tools.causal.causal_config import CausalConfig
  from responsibleai._tools.causal.causal_constants import DefaultParams, ModelTypes
  from responsibleai._tools.causal.causal_result import CausalResult
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.feature_metadata import FeatureMetadata
  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 CausalManager obj's underlying member method code with example usage: obj.request_local_instance_effects(id, X_test) and returns: result