code: def _extract_inner_estimator(estimator, feature_names):
      # Start unpacking the estimator to get to the final step
      inner_estimator = estimator
      if isinstance(inner_estimator, SimpleClassifier) or isinstance(
          inner_estimator, SimpleRegressor
      ):
          # get the pipeline
          inner_estimator = inner_estimator.est_
      elif isinstance(inner_estimator, AnyClassifier):
          inner_estimator = inner_estimator.est_
      if isinstance(inner_estimator, Pipeline):
          assert len(inner_estimator.steps) == 2
          # pipelines don't have feature names yet in sklearn
          # *cries in scikit-learn roadmap*
          final_est = inner_estimator._final_estimator
          try:
              feature_names = inner_estimator.steps[0][
                  1
              ].get_feature_names_out(feature_names)
          except TypeError:
              feature_names = inner_estimator.steps[0][
                  1
              ].get_feature_names_out()
  
          # now we have input feature names for the final step
          inner_estimator = final_est
      # done unwrapping, start evaluating
      return inner_estimator, np.array(feature_names)
  
file_path: dabl/dabl/explain.py
imports: import numpy
  import pandas
  from warnings import warn
  import matplotlib.pyplot
  from sklearn.tree import DecisionTreeClassifier, plot_tree
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.pipeline import Pipeline
  from sklearn.metrics import classification_report, confusion_matrix
  from sklearn.inspection import PartialDependenceDisplay
  from sklearn.feature_selection import f_classif
  from sklearn.impute import SimpleImputer
  from .models import SimpleClassifier, SimpleRegressor, AnyClassifier
  from .utils import _validate_Xyt
  from .plot.utils import plot_coefficients, plot_multiclass_roc_curve, find_pretty_grid, _make_subplots, _find_inliers, _get_scatter_alpha, _get_scatter_size
label_desc: Use image node_id 4 for calling a global function with example usage: _extract_inner_estimator(estimator, feature_names) and returns: inner_estimator,  np