<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def period(self, unit, size = 1):
 """Create a new period starting at instant. Period(('month', Instant((2014, 1, 1)), 1)) Period(('year', Instant((2014, 2, 1)), 2)) Period(('day', Instant((2014, 2, 3)), 2)) """

        assert unit in (DAY, MONTH, YEAR), 'Invalid unit: {} of type {}'.format(unit, type(unit))
        assert isinstance(size, int) and size >= 1, 'Invalid size: {} of type {}'.format(size, type(size))
        return Period((unit, self, size))