class_docstr: Detect features that are nearly unused by the model.
  
  The check uses feature importance (either internally computed in appropriate models or calculated by permutation
  feature importance) to detect features that are not used by the model. From this list, the check sorts the features
  by their variance (as calculated by a PCA transformation). High variance unused features may be containing
  information that is ignored by the model.
  
  Parameters
  ----------
  feature_importance_threshold : float , default: 0.2
      A cutoff value for the feature importance, measured by the ratio of
      each features' feature importance to the mean feature importance. Features with lower importance
      are not shown in the check display.
  feature_variance_threshold : float , default: 0.4
      A cutoff value for the feature variance, measured by the ratio of
      each features' feature variance to the mean feature variance. Unused features with lower variance
      are not shown in the check display.
  n_top_fi_to_show : int , default: 5
      The max number of important features to show in the check display.
  n_top_unused_to_show : int , default: 15
      The max number of unused features to show in the check display, from among
      unused features that have higher variance then is defined by feature_variance_threshold.
  n_samples : int , default: 1_000_000
      number of samples to use for this check.
  random_state : int , default: 42
      The random state to use for permutation feature importance and PCA.
class_docstr_tok: ["Detect","features","that","are","nearly","unused","by","the","model",".","The","check","uses","feature","importance","(","either","internally","computed","in","appropriate","models","or","calculated","by","permutation","feature","importance",")","to","detect","features","that","are","not","used","by","the","model",".","From","this","list",",","the","check","sorts","the","features","by","their","variance","(","as","calculated","by","a","PCA","transformation",")",".","High","variance","unused","features","may","be","containing","information","that","is","ignored","by","the","model",".","Parameters","--","--","--","--","--","feature_importance_threshold",":","float",",","default",":","0.2","A","cutoff","value","for","the","feature","importance",",","measured","by","the","ratio","of","each","features","'","feature","importance","to","the","mean","feature","importance",".","Features","with","lower","importance","are","not","shown","in","the","check","display",".","feature_variance_threshold",":","float",",","default",":","0.4","A","cutoff","value","for","the","feature","variance",",","measured","by","the","ratio","of","each","features","'","feature","variance","to","the","mean","feature","variance",".","Unused","features","with","lower","variance","are","not","shown","in","the","check","display",".","n_top_fi_to_show",":","int",",","default",":","5","The","max","number","of","important","features","to","show","in","the","check","display",".","n_top_unused_to_show",":","int",",","default",":","15","The","max","number","of","unused","features","to","show","in","the","check","display",",","from","among","unused","features","that","have","higher","variance","then","is","defined","by","feature_variance_threshold",".","n_samples",":","int",",","default",":","1_000_000","number","of","samples","to","use","for","this","check",".","random_state",":","int",",","default",":","42","The","random","state","to","use","for","permutation","feature","importance","and","PCA","."]
docstr: Add condition - require number of high variance unused features to be less or equal to threshold.
  
  Parameters
  ----------
  max_high_variance_unused_features : int , default: 5
      Maximum allowed number of high variance unused features.
docstr_tok: ["Add","condition","-","require","number","of","high","variance","unused","features","to","be","less","or","equal","to","threshold",".","Parameters","--","--","--","--","--","max_high_variance_unused_features",":","int",",","default",":","5","Maximum","allowed","number","of","high","variance","unused","features","."]
code: def add_condition_number_of_high_variance_unused_features_less_or_equal(
      self, max_high_variance_unused_features: int = 5
  ):
      """Add condition - require number of high variance unused features to be less or equal to threshold.
  
      Parameters
      ----------
      max_high_variance_unused_features : int , default: 5
          Maximum allowed number of high variance unused features.
      """
  
      def max_high_variance_unused_features_condition(
          result: dict,
      ) -> ConditionResult:
          high_var_features = result["unused features"]["high variance"]
          details = f"Found {len(high_var_features)} high variance unused features"
          category = (
              ConditionCategory.PASS
              if len(high_var_features)
              <= max_high_variance_unused_features
              else ConditionCategory.WARN
          )
          return ConditionResult(category, details)
  
      return self.add_condition(
          f"Number of high variance unused features is less or equal to"
          f" {max_high_variance_unused_features}",
          max_high_variance_unused_features_condition,
      )
  
file_path: deepchecks/deepchecks/tabular/checks/model_evaluation/unused_features.py
imports: import numpy
  import pandas
  import plotly.graph_objects
  from sklearn.base import TransformerMixin
  from sklearn.compose import ColumnTransformer
  from sklearn.decomposition import PCA
  from sklearn.impute import SimpleImputer
  from sklearn.pipeline import Pipeline
  from sklearn.preprocessing import OrdinalEncoder, RobustScaler
  from deepchecks.core import CheckResult, ConditionCategory, ConditionResult
  from deepchecks.core.errors import DeepchecksValueError
  from deepchecks.tabular import Context, SingleDatasetCheck
  from deepchecks.utils.function import run_available_kwargs
label_desc: Use image node_id 3 for calling the UnusedFeatures obj's underlying member method code with example usage: obj.add_condition_number_of_high_variance_unused_features_less_or_equal(max_high_variance_unused_features) and returns: self, ConditionResult