def sanitizeStructTime(struct):
maxValues = (<NUM_LIT>, <NUM_LIT:12>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>, <NUM_LIT>)<EOL>minValues = (<NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:0>)<EOL>newstruct = []<EOL>for value, maxValue, minValue in zip(struct[:<NUM_LIT:6>], maxValues, minValues):<EOL><INDENT>newstruct.append(max(minValue, min(value, maxValue)))<EOL><DEDENT>return tuple(newstruct) + struct[<NUM_LIT:6>:]<EOL>
Convert struct_time tuples with possibly invalid values to valid
ones by substituting the closest valid value.