def insert_or_update(self, time_to_search, data_value):
    if self.contains(time_to_search):
        self.update(time_to_search, data_value)
    else:
        self.append(TimedData(data_value, time_to_search, self.timestamp))
def insert_or_update(self, time_to_search, data_value):
    if self.contains(time_to_search):
        self.update(time_to_search, data_value)
    else:
        self.append(TimedData(data_value, time_to_search, self.timestamp))