code: def test_stack_on_self(es, test_transform_primitive):
      # test stacks on self
      child = Feature(
          es["log"].ww["value"],
          primitive=test_transform_primitive,
      )
      test_transform_primitive.stack_on = []
      child.primitive.base_of = []
      test_transform_primitive.stack_on_self = False
      child.primitive.stack_on_self = False
      assert not can_stack_primitive_on_inputs(
          test_transform_primitive(), [child]
      )
  
      test_transform_primitive.stack_on_self = True
      assert can_stack_primitive_on_inputs(
          test_transform_primitive(), [child]
      )
  
      test_transform_primitive.stack_on = None
      test_transform_primitive.stack_on_self = False
      assert not can_stack_primitive_on_inputs(
          test_transform_primitive(), [child]
      )
  
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 33 for calling a global function with example usage: test_stack_on_self(es, test_transform_primitive) without return types