@staticmethod<EOL><INDENT>def get_time_period(value):<DEDENT>
for time_period in TimePeriod:<EOL><INDENT>if time_period.period == value:<EOL><INDENT>return time_period<EOL><DEDENT><DEDENT>raise ValueError('<STR_LIT>'.format(value))<EOL>
Get the corresponding TimePeriod from the value.

        Example values: 'all', 'hour', 'day', 'week', or 'month'.