code: def test__plot_two_pd_cat_cat(explanation):
      """Test the `_plot_two_pd_cat_cat` function."""
      feature, target_idx = 7, 0
  
      _, ax = plt.subplots()
      ax, _ = _plot_two_pd_cat_cat(
          exp=explanation, feature=feature, target_idx=target_idx, ax=ax
      )
  
      assert np.allclose(
          ax.images[0].get_array().data,
          explanation.data["pd_values"][feature],
      )
  
      xlabel = ax.get_xlabel()
      ylabel = ax.get_ylabel()
      assert xlabel == explanation.data["feature_names"][feature][1]
      assert ylabel == explanation.data["feature_names"][feature][0]
  
      x_ticklabels = [int(tl.get_text()) for tl in ax.get_xticklabels()]
      y_ticklables = [int(tl.get_text()) for tl in ax.get_yticklabels()]
  
      feature_names = explanation.meta["params"]["feature_names"]
      categorical_names = explanation.meta["params"][
          "categorical_names"
      ]
      cat_idx0 = feature_names.index(
          explanation.data["feature_names"][feature][0]
      )
      cat_idx1 = feature_names.index(
          explanation.data["feature_names"][feature][1]
      )
  
      expected_x_ticklabels = [
          categorical_names[cat_idx1][int(val)]
          for val in explanation.data["feature_values"][feature][1]
      ]
      expected_y_ticklabels = [
          categorical_names[cat_idx0][int(val)]
          for val in explanation.data["feature_values"][feature][0]
      ]
      assert np.allclose(expected_x_ticklabels, x_ticklabels)
      assert np.allclose(expected_y_ticklabels, y_ticklables)
  
imports: import re
  import sys
  from copy import deepcopy
  from typing import Dict, List, Optional, Tuple, Union
  from packaging import version
  import matplotlib.pyplot
  import numpy
  import pandas
  import pytest
  from pytest_lazyfixture import lazy_fixture
  from sklearn.base import BaseEstimator
  from sklearn.datasets import make_classification
  from sklearn.ensemble import GradientBoostingClassifier
  from sklearn.exceptions import NotFittedError
  from sklearn.inspection import partial_dependence
  from sklearn.model_selection import train_test_split
  from sklearn.multioutput import MultiOutputClassifier
  from sklearn.pipeline import Pipeline
  from sklearn.utils import Bunch, shuffle
  import sklearn
  from alibi.api.defaults import DEFAULT_DATA_PD, DEFAULT_META_PD
  from alibi.api.interfaces import Explanation
  from alibi.explainers import PartialDependence, TreePartialDependence, plot_pd
  from alibi.explainers.partial_dependence import _plot_one_pd_cat, _plot_one_pd_num, _plot_two_pd_cat_cat, _plot_two_pd_num_cat, _plot_two_pd_num_num, _process_pd_ice, _sample_ice
label_desc: Use image node_id 29 for calling a global function with example usage: test__plot_two_pd_cat_cat(explanation) without return types