code: def remove_single_value_features(
      feature_matrix,
      features=None,
      count_nan_as_value=False,
  ):
      """Removes columns in feature matrix where all the values are the same.
  
      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.
          count_nan_as_value (bool): If True, missing values will be counted as their own unique value.
                      If set to False, a feature that has one unique value and all other
                      data missing will be removed from the feature matrix. Defaults to False.
  
       Returns:
          pd.DataFrame, list[:class:`.FeatureBase`]:
              The feature matrix and the list of generated feature definitions.
              Matches dfs output.
              If no feature list is provided as input, the feature list will not be returned.
      """
      unique_counts_by_col = feature_matrix.nunique(
          dropna=not count_nan_as_value,
      ).to_dict()
  
      keep = [
          f_name
          for f_name, unique_count in unique_counts_by_col.items()
          if unique_count > 1
      ]
      return _apply_feature_selection(keep, feature_matrix, features)
  
imports: import pandas
  from woodwork.logical_types import Boolean, BooleanNullable
label_desc: Use image node_id 3 for calling a global function with example usage: remove_single_value_features(feature_matrix, features, count_nan_as_value) and returns: _apply_feature_selection