code: def test_to_dictionary_where(es):
      primitive = Sum()
      actual = Feature(
          es["log"].ww["value"],
          parent_dataframe_name="sessions",
          where=IdentityFeature(es["log"].ww["value"]) == 2,
          primitive=primitive,
      ).to_dictionary()
  
      expected = {
          "type": "AggregationFeature",
          "dependencies": ["log: value", "log: value = 2"],
          "arguments": {
              "name": "SUM(log.value WHERE value = 2)",
              "base_features": ["log: value"],
              "relationship_path": [
                  {
                      "parent_dataframe_name": "sessions",
                      "child_dataframe_name": "log",
                      "parent_column_name": "id",
                      "child_column_name": "session_id",
                  },
              ],
              "primitive": primitive,
              "where": "log: value = 2",
              "use_previous": None,
          },
      }
  
      assert expected == actual
  
imports: import os.path
  import re
  import pytest
  from pympler.asizeof import asizeof
  from woodwork.column_schema import ColumnSchema
  from woodwork.logical_types import Datetime, Integer
  from featuretools import Feature, config, feature_base
  from featuretools.feature_base import IdentityFeature
  from featuretools.primitives import Count, Diff, Last, Mode, Negate, NMostCommon, NumUnique, Sum, TransformPrimitive
  from featuretools.synthesis.deep_feature_synthesis import can_stack_primitive_on_inputs
  from featuretools.tests.testing_utils import check_rename
label_desc: Use image node_id 15 for calling a global function with example usage: test_to_dictionary_where(es) without return types