code: def test_explain_linear_regression_feature_filter(boston_train):
      clf = ElasticNet(random_state=42)
      X, y, feature_names = boston_train
      clf.fit(X, y)
      res = explain_weights(
          clf,
          feature_names=feature_names,
          feature_re=re.compile("ratio$", re.I),
      )
      for expl in format_as_all(res, clf):
          assert "PTRATIO" in expl
          assert "LSTAT" not in expl
  
imports: from __future__ import absolute_import
  from functools import partial
  import re
  import numpy
  import scipy.sparse
  from sklearn.datasets import make_regression, make_multilabel_classification
  from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer, HashingVectorizer
  from sklearn.linear_model import ElasticNet, ElasticNetCV, HuberRegressor, Lars, LarsCV, Lasso, LassoCV, LassoLars, LassoLarsCV, LassoLarsIC, LinearRegression, LogisticRegression, LogisticRegressionCV, OrthogonalMatchingPursuit, OrthogonalMatchingPursuitCV, PassiveAggressiveClassifier, PassiveAggressiveRegressor, Perceptron, Ridge, RidgeClassifier, RidgeClassifierCV, RidgeCV, SGDClassifier, SGDRegressor, TheilSenRegressor
  from sklearn.svm import LinearSVC, LinearSVR, SVC, SVR, NuSVC, NuSVR, OneClassSVM
  from sklearn.ensemble import RandomForestClassifier, RandomForestRegressor, ExtraTreesClassifier, ExtraTreesRegressor, GradientBoostingClassifier, GradientBoostingRegressor, AdaBoostClassifier, AdaBoostRegressor
  from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
  from sklearn.base import BaseEstimator, clone
  from sklearn.pipeline import make_pipeline
  from sklearn.feature_selection import SelectKBest
  from sklearn.multiclass import OneVsRestClassifier
  import pytest
  from eli5 import _graphviz
  from eli5 import explain_weights, explain_weights_sklearn
  from eli5.sklearn.utils import has_intercept
  from eli5.sklearn import InvertableHashingVectorizer
  from .utils import format_as_all, get_all_features, get_names_coefs, SGD_KWARGS
label_desc: Use image node_id 24 for calling a global function with example usage: test_explain_linear_regression_feature_filter(boston_train) without return types