code: def test_transform_feature_names_iris(
      transformer, expected, iris_train
  ):
      X, y, _, _ = iris_train
      transformer.fit(X, y)
      # Test in_names being provided
      res = transform_feature_names(
          transformer, ["<NAME0>", "<NAME1>", "<NAME2>", "<NAME3>"]
      )
      assert res == expected
      # Test in_names being None
      expected_default_names = [
          re.sub("<NAME([0-9]+)>", r"x\1", name) for name in expected
      ]
      assert (
          transform_feature_names(transformer, None)
          == expected_default_names
      )
  
file_path: eli5/tests/test_sklearn_transform.py
imports: import re
  import pytest
  import numpy
  from sklearn.base import BaseEstimator, TransformerMixin
  from sklearn.feature_selection import SelectPercentile, SelectKBest, SelectFpr, SelectFdr, SelectFwe, GenericUnivariateSelect, VarianceThreshold, RFE, RFECV, SelectFromModel
  from sklearn.linear_model import LogisticRegression
  from sklearn.preprocessing import MinMaxScaler, StandardScaler, MaxAbsScaler, RobustScaler
  from sklearn.pipeline import FeatureUnion, make_pipeline
  from eli5 import transform_feature_names
  from eli5.sklearn import PermutationImportance
label_desc: Use image node_id 2 for calling a global function with example usage: test_transform_feature_names_iris(transformer, expected, iris_train) without return types