code: def test_function_body_uses_hashfuncs(self):
      hash_func = Mock(return_value=None)
  
      # This is an external object that's referenced by our
      # function. It cannot be hashed (without a custom hashfunc).
      dict_gen = {1: (x for x in range(1))}
  
      @st.cache(hash_funcs={"builtins.generator": hash_func})
      def foo(arg):
          # Reference the generator object. It will be hashed when we
          # hash the function body to generate foo's cache_key.
          print(dict_gen)
          return []
  
      foo(1)
      foo(2)
      hash_func.assert_called_once()
  
imports: import threading
  import types
  from unittest.mock import Mock, patch
  from parameterized import parameterized
  import streamlit
  from streamlit.elements import exception
  from streamlit.proto.Exception_pb2 import Exception
  from streamlit.runtime.legacy_caching import caching, hashing
  from tests import testutil
  from tests.delta_generator_test_case import DeltaGeneratorTestCase
label_desc: Use image node_id 14 for calling the CacheTest obj's underlying member method code with example usage: obj.test_function_body_uses_hashfuncs() and returns: list