code: def assert_last_day(self, period_end):
      # 30 days has september, april, june and november
      if period_end.month in [9, 4, 6, 11]:
          self.assertEqual(period_end.day, 30)
      # all the rest have 31, except for february
      elif period_end.month != 2:
          self.assertEqual(period_end.day, 31)
      else:
          if calendar.isleap(period_end.year):
              self.assertEqual(period_end.day, 29)
          else:
              self.assertEqual(period_end.day, 28)
  
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 19 for calling the TestRisk obj's underlying member method code with example usage: obj.assert_last_day(period_end) without return types