code: def test_inplace_encodes_features(pd_es):
      f1 = IdentityFeature(pd_es["log"].ww["product_id"])
  
      features = [f1]
      feature_matrix = calculate_feature_matrix(
          features,
          pd_es,
          instance_ids=[0, 1, 2, 3, 4, 5],
      )
  
      feature_matrix_shape = feature_matrix.shape
      feature_matrix_encoded, _ = encode_features(
          feature_matrix, features
      )
      assert feature_matrix_encoded.shape != feature_matrix_shape
      assert feature_matrix.shape == feature_matrix_shape
  
      # inplace they should be the same
      feature_matrix_encoded, _ = encode_features(
          feature_matrix, features, inplace=True
      )
      assert feature_matrix_encoded.shape == feature_matrix.shape
  
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 3 for calling a global function with example usage: test_inplace_encodes_features(pd_es) without return types