code: func ParseRelayFactor(n int) (uint8, error) {
  	if n < 0 || n > 5 {
  		return 0, fmt.Errorf("Relay factor must be in range: [0, 5]")
  	}
  	return uint8(n), nil
  }
docs: // ParseRelayFactor validates and converts the given relay factor to uint8