code: def get_lr(self, score):
          
          # Find the index of the closest value that was precomputed in lr_curves
          # This will significantly speed up |get_lr|.
  
          # The lr_curves_cache is a list of scalar distance
          # measurements
          lr_curves_cache = np.array([s[0] for s in self.lr_curves])
  
          # np.argmin produces the index to the part of the curve
          # where distance is the smallest to the score which we are
          # inspecting currently.
          idx = np.argmin(abs(score - lr_curves_cache))
  
          numer_val = self.lr_curves[idx][1][0]
          denum_val = self.lr_curves[idx][1][1]
  
          # Compute LR based on numerator and denominator values
          return float(numer_val) / float(denum_val)
docs: Compute a :float: likelihood ratio from a provided similarity score when compared
          to two probability density functions which are computed and pre-loaded during init.
  
          The numerator indicates the probability density that a particular similarity score
          corresponds to a 'good' addon donor, i.e. a client that is similar in the sense of
          telemetry variables. The denominator indicates the probability density that a particular
          similarity score corresponds to a 'poor' addon donor
  
          :param score: A similarity score between a pair of objects.
          :returns: The approximate float likelihood ratio corresponding to provided score.