code: def adaptTraveltime(self, edgeID, time, begin=None, end=None):
          
          if begin is None and end is None:
              self._connection._beginMessage(
                  tc.CMD_SET_EDGE_VARIABLE, tc.VAR_EDGE_TRAVELTIME, edgeID, 1 + 4 + 1 + 8)
              self._connection._string += struct.pack("!BiBd",
                                                      tc.TYPE_COMPOUND, 1, tc.TYPE_DOUBLE, time)
              self._connection._sendExact()
          elif begin is not None and end is not None:
              self._connection._beginMessage(
                  tc.CMD_SET_EDGE_VARIABLE, tc.VAR_EDGE_TRAVELTIME, edgeID, 1 + 4 + 1 + 4 + 1 + 4 + 1 + 8)
              self._connection._string += struct.pack("!BiBiBiBd",
                                                      tc.TYPE_COMPOUND, 3,
                                                      tc.TYPE_INTEGER, begin,
                                                      tc.TYPE_INTEGER, end,
                                                      tc.TYPE_DOUBLE, time)
              self._connection._sendExact()
          else:
              raise TraCIException(
                  "Both, begin time and end time must be specified")
docs: adaptTraveltime(string, double, int, int) -> None
  
          Adapt the travel time value (in s) used for (re-)routing for the given edge.
  
          When setting begin time and end time (in seconds), the changes only
          apply to that time range. Otherwise they apply all the time