code: def test_encode_unknown_features():
      # Dataframe with categorical column with "unknown" string
      df = pd.DataFrame(
          {"category": ["unknown", "b", "c", "d", "e"]}
      ).astype(
          {"category": "category"},
      )
  
      pd_es = EntitySet("test")
      pd_es.add_dataframe(
          dataframe_name="a",
          dataframe=df,
          index="index",
          make_index=True,
      )
      features, feature_defs = dfs(
          entityset=pd_es,
          target_dataframe_name="a",
          max_depth=1,
      )
  
      # Specify unknown token for replacement
      features_enc, _ = encode_features(
          features, feature_defs, include_unknown=True
      )
      assert list(features_enc.columns) == [
          "category = unknown",
          "category = e",
          "category = d",
          "category = c",
          "category = b",
          "category is unknown",
      ]
  
file_path: featuretools/featuretools/tests/synthesis/test_encode_features.py
imports: import pandas
  import pytest
  from featuretools import EntitySet, calculate_feature_matrix, dfs
  from featuretools.feature_base import Feature, IdentityFeature
  from featuretools.primitives import NMostCommon
  from featuretools.synthesis import encode_features
label_desc: Use image node_id 7 for calling a global function with example usage: test_encode_unknown_features() without return types