code: func buildBrokenLinearFunction(shape FunctionShape) func(int64) int64 {
  	n := len(shape)
  	return func(p int64) int64 {
  		for i := 0; i < n; i++ {
  			if p <= shape[i].Utilization {
  				if i == 0 {
  					return shape[0].Score
  				}
  				return shape[i-1].Score + (shape[i].Score-shape[i-1].Score)*(p-shape[i-1].Utilization)/(shape[i].Utilization-shape[i-1].Utilization)
  			}
  		}
  		return shape[n-1].Score
  	}
  }
docs: // Creates a function which is built using linear segments. Segments are defined via shape array.
  // Shape[i].Utilization slice represents points on "utilization" axis where different segments meet.
  // Shape[i].Score represents function values at meeting points.
  //
  // function f(p) is defined as:
  //   shape[0].Score for p < f[0].Utilization
  //   shape[i].Score for p == shape[i].Utilization
  //   shape[n-1].Score for p > shape[n-1].Utilization
  // and linear between points (p < shape[i].Utilization)