code: def setValidTo(self, value):
          
  
          valid_from = self.getValidFrom()
          valid_to = DateTime(value)
          interval = self.getExpirationInterval()
  
          if valid_from and interval:
              valid_to = valid_from + int(interval)
              self.getField("ValidTo").set(self, valid_to)
              logger.debug("Set ValidTo Date to: %r" % valid_to)
          else:
              # just set the value
              self.getField("ValidTo").set(self, valid_to)
docs: Custom setter method to calculate a `ValidTo` date based on
          the `ValidFrom` and `ExpirationInterval` field values.