code: def _NormalizeDuration(self, seconds, nanos):
      
      # Force nanos to be negative if the duration is negative.
      if seconds < 0 and nanos > 0:
        seconds += 1
        nanos -= _NANOS_PER_SECOND
      self.seconds = seconds
      self.nanos = nanos
docs: Set Duration by seconds and nonas.