code: def _check_causal_result(causal_result, is_serialized=False):
      assert len(causal_result.id) > 0
  
      _check_config(causal_result.config, is_serialized=is_serialized)
  
      if is_serialized:
          assert isinstance(causal_result, CausalData)
          assert len(causal_result.__dict__) == 6
      else:
          assert isinstance(causal_result, CausalResult)
          assert len(causal_result.__dict__) == 8
          _check_causal_analysis(causal_result.causal_analysis)
  
      _check_global_effects(
          causal_result.global_effects, is_serialized=is_serialized
      )
      _check_local_effects(
          causal_result.local_effects, is_serialized=is_serialized
      )
      _check_policies(
          causal_result.policies,
          causal_result.config,
          is_serialized=is_serialized,
      )
  
imports: import numpy
  import pandas
  import pytest
  from econml.solutions.causal_analysis._causal_analysis import CausalAnalysis
  from raiutils.exceptions import UserConfigValidationException
  from raiutils.models import ModelTask
  from responsibleai._interfaces import CausalConfig, CausalData, CausalPolicy, CausalPolicyGains, CausalPolicyTreeInternal, CausalPolicyTreeLeaf
  from responsibleai._internal.constants import CausalManagerKeys, ListProperties, ManagerNames
  from responsibleai._tools.causal.causal_result import CausalResult
label_desc: Use image node_id 3 for calling a global function with example usage: _check_causal_result(causal_result, is_serialized) without return types