code: def assert_range_length(
      self, col, total_months, period_length, start_date
  ):
      if period_length > total_months:
          self.assertFalse(col)
      else:
          period_end = pd.Timestamp(col[-1]["period_label"], tz="utc")
          self.assertEqual(
              len(col),
              total_months - (period_length - 1),
              (
                  "mismatch for total months - expected:{total_months}/"
                  "actual:{actual}, period:{period_length}, "
                  "start:{start_date}, calculated end:{end}"
              ).format(
                  total_months=total_months,
                  period_length=period_length,
                  start_date=start_date,
                  end=period_end,
                  actual=len(col),
              ),
          )
          self.assert_month(start_date.month, period_end.month)
  
imports: import datetime
  import pandas
  import numpy
  from zipline.utils import factory
  from zipline.finance.trading import SimulationParameters
  import zipline.testing.fixtures
  from zipline.finance.metrics import _ClassicRiskMetrics
label_desc: Use image node_id 18 for calling the TestRisk obj's underlying member method code with example usage: obj.assert_range_length(col, total_months, period_length, start_date) without return types