code: def select_active_variables(method):
      @functools.wraps(method)
      def _impl(self, X=None, *method_args, **method_kwargs):
          if hasattr(self, "feature_names_in_") and isinstance(
              X, pd.DataFrame
          ):
              return method(
                  self,
                  X[self.feature_names_in_],
                  *method_args,
                  **method_kwargs,
              )
          return method(self, X, *method_args, **method_kwargs)
  
      return _impl
  
imports: from __future__ import annotations
  import functools
  import altair
  import numpy
  import pandas
  import sklearn.base
  import sklearn.utils
  from sklearn import preprocessing
  from prince import svd, utils
label_desc: Use image node_id 1 for calling a global function with example usage: select_active_variables(method) and returns: _impl, method, method