class_docstr: Result of causal analysis.
class_docstr_tok: ["Result","of","causal","analysis","."]
docstr: Get global causal effects for cohort data.
  
  :param X_test: The data for which the causal policy
                 needs to be generated.
  :type X_test: Any
  :return: An object of type CausalData with
           causal effects.
  :rtype: CausalData
docstr_tok: ["Get","global","causal","effects","for","cohort","data",".",":","param","X_test",":","The","data","for","which","the","causal","policy","needs","to","be","generated",".",":","type","X_test",":","Any",":","return",":","An","object","of","type","CausalData","with","causal","effects",".",":","rtype",":","CausalData"]
code: def _global_cohort_effects(self, X_test):
      """Get global causal effects for cohort data.
  
      :param X_test: The data for which the causal policy
                     needs to be generated.
      :type X_test: Any
      :return: An object of type CausalData with
               causal effects.
      :rtype: CausalData
      """
      causal_data = self._create_causal_data_object()
      causal_data.global_effects = (
          self.causal_analysis.cohort_causal_effect(
              X_test, alpha=self.config.alpha, keep_all_levels=True
          )
          .reset_index()
          .to_dict(orient="records")
      )
      return causal_data
  
imports: import json
  import re
  import uuid
  from pathlib import Path
  from typing import Any, List, Optional, Tuple, Union
  import pandas
  import semver
  from responsibleai._interfaces import CausalConfig
  from responsibleai._interfaces import CausalData, CausalPolicy, CausalPolicyGains, CausalPolicyTreeInternal, CausalPolicyTreeLeaf, ComparisonTypes
  from responsibleai._internal.constants import FileFormats, SerializationAttributes
  from responsibleai._tools.causal.causal_config import CausalConfig
  from responsibleai._tools.causal.causal_constants import ResultAttributes
  from responsibleai._tools.shared.base_result import BaseResult
  from responsibleai._tools.shared.versions import CausalVersions
label_desc: Use image node_id 6 for calling the CausalResult obj's underlying member method code with example usage: obj._global_cohort_effects(X_test) and returns: causal_data