code: def test_set_data_path(es):
      key = "primitive_data_folder"
  
      # Don't change orig_path
      orig_path = config.get(key)
      new_path = "/example/new/directory"
      filename = "test.csv"
  
      # Test that default path works
      sum_prim = Sum()
      assert sum_prim.get_filepath(filename) == os.path.join(
          orig_path, filename
      )
  
      # Test that new path works
      config.set({key: new_path})
      assert sum_prim.get_filepath(filename) == os.path.join(
          new_path, filename
      )
  
      # Test that new path with trailing / works
      new_path += "/"
      config.set({key: new_path})
      assert sum_prim.get_filepath(filename) == os.path.join(
          new_path, filename
      )
  
      # Test that the path is correct on newly defined feature
      sum_prim2 = Sum()
      assert sum_prim2.get_filepath(filename) == os.path.join(
          new_path, filename
      )
  
      # Ensure path was reset
      config.set({key: orig_path})
      assert config.get(key) == orig_path
  
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 11 for calling a global function with example usage: test_set_data_path(es) without return types