code: func HashPriority(certs []*x509.Certificate) int {
  	ret := 0.0
  	for i, cert := range certs {
  		f1 := 1.0 / (float64(i) + 1.0)
  		f2 := 1.0 - f1
  		ret = ret*f2 + float64(hashPriority(cert))*f1
  	}
  	return int(ret)
  }
docs: // HashPriority returns the hash priority of the chain as the average of hash priority of certs in it.