code: func (t *TimePeriod) Normalize() error {
  	if t.GetDuration() == "" {
  		return nil
  	}
  	n, err := t.Time.(*TimePeriod_Duration).ToSeconds()
  	if err != nil {
  		return errors.Annotate(err, "invalid duration").Err()
  	}
  	t.Time = &TimePeriod_Seconds{
  		Seconds: n,
  	}
  	return nil
  }
docs: // Normalize ensures this time period is in seconds.
  // Parses and converts duration to seconds if necessary.