code: def test_validate_caching(data):
      # prove that results with or without caching don't change anything
      init_amt = 1e6
      env_uncached = StockTradingEnvCashpenalty(
          df=data, initial_amount=init_amt, cache_indicator_data=False
      )
      env_cached = StockTradingEnvCashpenalty(
          df=data, initial_amount=init_amt, cache_indicator_data=True
      )
      _ = env_uncached.reset()
      _ = env_cached.reset()
      for i in range(10):
          actions = np.random.uniform(low=-1, high=1, size=2)
          print(f"actions: {actions}")
          un_state, un_reward, _, _ = env_uncached.step(actions)
          ca_state, ca_reward, _, _ = env_cached.step(actions)
  
          assert un_state == ca_state
          assert un_reward == ca_reward
  
file_path: FinRL/unit_tests/environments/test_cash_penalty.py
imports: from __future__ import annotations
  import numpy
  import pytest
  from finrl.meta.env_stock_trading.env_stocktrading_cashpenalty import StockTradingEnvCashpenalty
  from finrl.meta.preprocessor.yahoodownloader import YahooDownloader
label_desc: Use image node_id 9 for calling a global function with example usage: test_validate_caching(data) without return types