code: def assert_range_length(
      self, col, total_months, period_length, start_date
  ):
      if period_length > total_months:
          self.assertEqual(len(col), 0)
      else:
          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=col[-1]._end_session,
                  actual=len(col),
              ),
          )
          self.assert_month(
              start_date.month, col[-1]._end_session.month
          )
          self.assert_last_day(col[-1]._end_session)
  
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 21 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