code: def test_fit_cache():
      """Test that a fit with a random seed set is cached."""
  
      cache_size_before = file_usage(cache_path())
      # this fit is cacheable
      random_seed = random.randrange(1, 2**16)
      normal_posterior = stan.build(
          program_code, random_seed=random_seed
      )
      normal_posterior.sample()
      cache_size_after = file_usage(cache_path())
      assert cache_size_after > cache_size_before
  
      # fit is now in cache
      cache_size_before = file_usage(cache_path())
      normal_posterior.sample()
      cache_size_after = file_usage(cache_path())
      assert cache_size_before == cache_size_after
  
file_path: pystan/tests/test_fit_cache.py
imports: import os
  import pathlib
  import random
  import httpstan.cache
  import stan
label_desc: Use image node_id 3 for calling a global function with example usage: test_fit_cache() without return types