@staticmethod<EOL><INDENT>def get_time_buckets_from_metadata(metadata):<DEDENT>
start = metadata['<STR_LIT:start>']<EOL>end = metadata.get('<STR_LIT:end>') or start<EOL>buckets = DatalakeRecord.get_time_buckets(start, end)<EOL>if len(buckets) > DatalakeRecord.MAXIMUM_BUCKET_SPAN:<EOL><INDENT>msg = '<STR_LIT>'<EOL>j = json.dumps(metadata)<EOL>msg = msg.format(j)<EOL>raise UnsupportedTimeRange(msg)<EOL><DEDENT>return buckets<EOL>
return a list of time buckets in which the metadata falls