code: def remove_low_information_features(feature_matrix, features=None):
      """Select features that have at least 2 unique values and that are not all null
  
      Args:
          feature_matrix (:class:`pd.DataFrame`): DataFrame whose columns are feature names and rows are instances
          features (list[:class:`featuretools.FeatureBase`] or list[str], optional): List of features to select
  
      Returns:
          (feature_matrix, features)
  
      """
      keep = [
          c
          for c in feature_matrix
          if (
              feature_matrix[c].nunique(dropna=False) > 1
              and feature_matrix[c].dropna().shape[0] > 0
          )
      ]
      feature_matrix = feature_matrix[keep]
      if features is not None:
          features = [
              f
              for f in features
              if f.get_name() in feature_matrix.columns
          ]
          return feature_matrix, features
      return feature_matrix
  
imports: import pandas
  from woodwork.logical_types import Boolean, BooleanNullable
label_desc: Use image node_id 1 for calling a global function with example usage: remove_low_information_features(feature_matrix, features) and returns: feature_matrix, feature_matrix,  features