code: def _test_algorithm_leverages(self):
      # Max leverage for an algorithm with 'None' as leverage is 0.
      np.testing.assert_equal(
          [x.max_leverage for x in self.metrics.month_periods],
          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
      )
      np.testing.assert_equal(
          [x.max_leverage for x in self.metrics.three_month_periods],
          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
      )
      np.testing.assert_equal(
          [x.max_leverage for x in self.metrics.six_month_periods],
          [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0],
      )
      np.testing.assert_equal(
          [x.max_leverage for x in self.metrics.year_periods], [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 22 for calling the TestRisk obj's underlying member method code with example usage: obj._test_algorithm_leverages() without return types