code: def _test_sharpe_value_when_null(self):
      # Sharpe is displayed as '0.0' instead of np.nan
      null_returns = factory.create_returns_from_list(
          [0.0] * 251, self.sim_params
      )
      test_period = RiskMetricsPeriod(
          start_session=self.start_session,
          end_session=self.end_session,
          returns=null_returns,
          benchmark_returns=self.benchmark_returns,
          trading_calendar=self.trading_calendar,
          treasury_curves=self.env.treasury_curves,
      )
      assert test_period.sharpe == 0.0
  
imports: import datetime
  import calendar
  import pandas
  import numpy
  import catalyst.finance.risk
  from catalyst.utils import factory
  from catalyst.finance.trading import SimulationParameters
  from catalyst.testing.fixtures import WithTradingEnvironment, CatalystTestCase
  from catalyst.finance.risk.period import RiskMetricsPeriod
label_desc: Use image node_id 25 for calling the TestRisk obj's underlying member method code with example usage: obj._test_sharpe_value_when_null() without return types