code: def test_sharpe_ratio(self, net_worths):
      scheme = rewards.RiskAdjustedReturns(
          return_algorithm="sharpe", risk_free_rate=0, window_size=1
      )
  
      returns = net_worths[-2:].pct_change().dropna()
  
      expected_ratio = (np.mean(returns) + 1e-9) / (
          np.std(returns) + 1e-9
      )
      sharpe_ratio = scheme._sharpe_ratio(returns)
  
      assert sharpe_ratio == expected_ratio
  
file_path: tensortrade/tests/tensortrade/unit/env/default/test_rewards.py
imports: import pytest
  import numpy
  import pandas
  from collections import OrderedDict
  import tensortrade.env.default.rewards
  from tensortrade.core import TradingContext
  from tensortrade.oms.wallets import Portfolio
  from tensortrade.oms.instruments import USD
label_desc: Use image node_id 1 for calling the TestRiskAdjustedReturns obj's underlying member method code with example usage: obj.test_sharpe_ratio(net_worths) without return types