docstr: confirm that the right number of riskmetrics were calculated for each
  window length.
docstr_tok: ["confirm","that","the","right","number","of","riskmetrics","were","calculated","for","each","window","length","."]
code: def check_metrics(self, metrics, total_months, start_date):
      """
      confirm that the right number of riskmetrics were calculated for each
      window length.
      """
      self.assert_range_length(
          metrics.month_periods, total_months, 1, start_date
      )
  
      self.assert_range_length(
          metrics.three_month_periods, total_months, 3, start_date
      )
  
      self.assert_range_length(
          metrics.six_month_periods, total_months, 6, start_date
      )
  
      self.assert_range_length(
          metrics.year_periods, total_months, 12, start_date
      )
  
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 18 for calling the TestRisk obj's underlying member method code with example usage: obj.check_metrics(metrics, total_months, start_date) without return types