code: def _recommend_non_numeric_primitives(
      entityset: EntitySet,
      target_dataframe_name: str,
      valid_primitives: List[str],
  ) -> set:
      """Get a set of non-numeric primitives for a given dataset and a list of primitives.
  
      Description:
          Given a single table entity set with a `target_dataframe_name` and an applicable list of `valid_primitives`,
          get a set of primitives which produce non-unique features.
  
      Args:
          entityset (EntitySet): EntitySet that only contains one dataframe.
          target_dataframe_name (str): Name of target dataframe to access in `entityset`.
          valid_primitives (List[str]): List of primitives to calculate and check output features.
      """
  
      recommended_non_numeric_primitives: set[str] = set()
      # Only want to run feature generation on non numeric primitives
      numeric_columns_to_ignore = list(
          entityset[target_dataframe_name]
          .ww.select(include="numeric", return_schema=True)
          .columns,
      )
      features = dfs(
          entityset=entityset,
          target_dataframe_name=target_dataframe_name,
          trans_primitives=valid_primitives,
          max_depth=1,
          features_only=True,
          ignore_columns={
              target_dataframe_name: numeric_columns_to_ignore
          },
      )
  
      for f in features:
          if (
              f.primitive.name is not None
              and f.primitive.name
              not in recommended_non_numeric_primitives
          ):
              try:
                  matrix = calculate_feature_matrix([f], entityset)
                  for f_name in f.get_feature_names():
                      if len(matrix[f_name].unique()) > 1:
                          recommended_non_numeric_primitives.add(
                              f.primitive.name
                          )
              except (
                  Exception
              ) as e:  # If error in calculating feature matrix pass on the recommendation
                  logger = logging.getLogger("featuretools")
                  logger.error(
                      f"Exception with feature {f.get_name()} with primitive {f.primitive.name}: {str(e)}",
                  )
  
      return recommended_non_numeric_primitives
  
file_path: featuretools/featuretools/utils/recommend_primitives.py
imports: import logging
  from typing import List
  from featuretools.computational_backends import calculate_feature_matrix
  from featuretools.entityset import EntitySet
  from featuretools.primitives.utils import get_transform_primitives
  from featuretools.synthesis import dfs, get_valid_primitives
label_desc: Use image node_id 2 for calling a global function with example usage: _recommend_non_numeric_primitives(entityset, target_dataframe_name, valid_primitives) and returns: recommended_non_numeric_primitives