code: def test_plot_pd_sharey_row(n_cols, explanation):
      """Test if all axes on the same rows have the same y limits and axes on different rows have different y limits
      when ``sharey='row'``."""
      features = [0, 1, 2]
      n_rows = len(features) // n_cols + (len(features) % n_cols != 0)
      axes = plot_pd(
          exp=explanation,
          features=features,
          n_cols=n_cols,
          sharey="row",
      )
      ylims = []
  
      for i in range(axes.shape[0]):
          ylim = set(
              [ax.get_ylim() for ax in axes[i] if ax is not None]
          )
          assert len(ylim) == 1
          ylims.append(ylim.pop())
  
      assert len(set(ylims)) == n_rows
  
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 38 for calling a global function with example usage: test_plot_pd_sharey_row(n_cols, explanation) without return types