code: def test_serialization(es):
      value = IdentityFeature(es["products"].ww["rating"])
      direct = DirectFeature(value, "log")
  
      log_to_products = next(
          r
          for r in es.get_forward_relationships("log")
          if r.parent_dataframe.ww.name == "products"
      )
      dictionary = {
          "name": direct.get_name(),
          "base_feature": value.unique_name(),
          "relationship": log_to_products.to_dictionary(),
      }
  
      assert dictionary == direct.get_arguments()
      assert direct == DirectFeature.from_dictionary(
          dictionary,
          es,
          {value.unique_name(): value},
          PrimitivesDeserializer(),
      )
  
imports: import numpy
  import pandas
  import pytest
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Datetime
  from featuretools.computational_backends.feature_set import FeatureSet
  from featuretools.computational_backends.feature_set_calculator import FeatureSetCalculator
  from featuretools.feature_base import DirectFeature, Feature, IdentityFeature
  from featuretools.primitives import AggregationPrimitive, Day, Hour, Minute, Month, NMostCommon, Second, TransformPrimitive, Year
  from featuretools.primitives.utils import PrimitivesDeserializer
  from featuretools.synthesis import dfs
  from featuretools.tests.testing_utils import to_pandas
  from featuretools.utils.gen_utils import Library
label_desc: Use image node_id 12 for calling a global function with example usage: test_serialization(es) without return types