def apply_time_to_configurations(self, configurations, data):
time_value = None<EOL>if data.get('<STR_LIT:time>'):<EOL><INDENT>time_value = data['<STR_LIT:time>']<EOL>if isinstance(data['<STR_LIT:time>'], (tuple, list)):<EOL><INDENT>time_value = time_value[<NUM_LIT:0>]<EOL><DEDENT><DEDENT>if time_value:<EOL><INDENT>for config in configurations:<EOL><INDENT>config.set_time_index_from_datetime(time_value, best_fit=ALLOW_BEST_FIT_TIME_INDEX)<EOL><DEDENT><DEDENT>return configurations<EOL>
Applies the correct time index to configurations