def assert_last_day(self, period_end):
        # 30 days has september, april, june and november
        if [9, 4, 6, 11] in period_end.month:
            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)
dataset/ETHPy150Open quantopian/zipline/tests/risk/test_risk_period.py/TestRisk.assert_last_day/swapped operands of `in`