code: def test_patient(data, ticker_list):
      # Prove that we just not buying any new assets if running out of cash and the cycle is not ended
      aapl_first_close = (
          data[data["tic"] == "AAPL"].head(1)["close"].values[0]
      )
      init_amt = aapl_first_close
      hmax = aapl_first_close * 100
      env = StockTradingEnvCashpenalty(
          df=data,
          initial_amount=init_amt,
          hmax=hmax,
          cache_indicator_data=False,
          patient=True,
          random_start=False,
      )
      _ = env.reset()
  
      actions = np.array([1.0, 1.0])
      next_state, _, is_done, _ = env.step(actions)
      holdings = next_state[1 : 1 + len(ticker_list)]
  
      assert not is_done
      assert np.sum(holdings) == 0
  
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 5 for calling a global function with example usage: test_patient(data, ticker_list) without return types