code: func MaxUnitForDuration(d time.Duration) (int64, Unit) {
  	var (
  		currMultiple int64
  		currUnit     = Nanosecond
  		dUnixNanos   = d.Nanoseconds()
  		isNegative   bool
  	)
  	if dUnixNanos < 0 {
  		dUnixNanos = -dUnixNanos
  		isNegative = true
  	}
  	for _, u := range unitsByDurationDesc {
  		// The unit is guaranteed to be valid so it's safe to ignore error here.
  		duration, _ := u.Value()
  		if dUnixNanos < duration.Nanoseconds() {
  			continue
  		}
  		durationUnixNanos := int64(duration)
  		quotient := dUnixNanos / durationUnixNanos
  		remainder := dUnixNanos - quotient*durationUnixNanos
  		if remainder != 0 {
  			continue
  		}
  		currMultiple = quotient
  		currUnit = u
  		break
  	}
  	if isNegative {
  		currMultiple = -currMultiple
  	}
  	return currMultiple, currUnit
  }
docs: // MaxUnitForDuration determines the maximum unit for which
  // the input duration is a multiple of.