code: def __setitem__(self, key, val):
      if key in self.timestamps:
          pos = self.timestamps.index(key)
          if val is None:
              del self.timestamps[pos]
              del self.values[pos]
          else:
              self.values[pos] = val
      else:
          self.timestamps = sorted(self.timestamps + [key])
          pos = self.timestamps.index(key)
          self.values.insert(pos, val)
  
imports: import numpy
label_desc: Use image node_id 9 for calling the TimeSeries obj's underlying member method code with example usage: obj.__setitem__(key, val) without return types