code: func memory(stats statsFunc) cmpFunc {
  	return func(p1, p2 *v1.Pod) int {
  		p1Stats, p1Found := stats(p1)
  		p2Stats, p2Found := stats(p2)
  		if !p1Found || !p2Found {
  			// prioritize evicting the pod for which no stats were found
  			return cmpBool(!p1Found, !p2Found)
  		}
  
  		// adjust p1, p2 usage relative to the request (if any)
  		p1Memory := memoryUsage(p1Stats.Memory)
  		p1Request := podRequest(p1, v1.ResourceMemory)
  		p1Memory.Sub(p1Request)
  
  		p2Memory := memoryUsage(p2Stats.Memory)
  		p2Request := podRequest(p2, v1.ResourceMemory)
  		p2Memory.Sub(p2Request)
  
  		// prioritize evicting the pod which has the larger consumption of memory
  		return p2Memory.Cmp(*p1Memory)
  	}
  }
docs: // memory compares pods by largest consumer of memory relative to request.