code: def test_categorical_policy(self, housing_data_categorical):
      train_df, test_df, target_feature = housing_data_categorical
      categoricals = train_df.select_dtypes(include=[object]).columns
  
      # Just use categoricals to force categorical policy tree
      new_features = list(categoricals) + [target_feature]
      train_df = train_df[new_features]
      test_df = test_df[new_features]
  
      # Sample data for easier debug
      test_df = test_df[:20]
  
      manager = CausalManager(
          train_df,
          test_df,
          target_feature,
          ModelTask.REGRESSION,
          categoricals,
      )
  
      result = manager.add(
          ["HouseAge_CAT", "Population_CAT"], random_state=42
      )
      manager.compute()
      result = manager.get()[0]
      dashboard_data = result._get_dashboard_data()
  
      policies = dashboard_data["policies"]
      assert len(policies) > 0
      for policy in policies:
          tree = policy["policy_tree"]
          assert not tree["leaf"]
          assert tree["feature"] in categoricals
          assert tree["right_comparison"] == "eq"
          is_very_old_comparison = (
              tree["comparison_value"] == "very-old"
          )
          is_high_comparison = tree["comparison_value"] == "high"
          assert is_very_old_comparison or is_high_comparison
  
imports: import os
  from unittest.mock import ANY, patch
  import numpy
  import pytest
  from raiutils.exceptions import UserConfigValidationException
  from raiutils.models import ModelTask
  from responsibleai import RAIInsights
  from responsibleai._interfaces import CausalData
  from responsibleai._internal.constants import FileFormats
  from responsibleai._tools.shared.state_directory_management import DirectoryManager
  from responsibleai.managers.causal_manager import CausalManager
label_desc: Use image node_id 1 for calling the TestCausalDashboardData obj's underlying member method code with example usage: obj.test_categorical_policy(housing_data_categorical) without return types