code: def evaluate(reference_tempi, reference_weight, estimated_tempi, **kwargs):
      
      # Compute all metrics
      scores = collections.OrderedDict()
  
      (scores['P-score'],
       scores['One-correct'],
       scores['Both-correct']) = util.filter_kwargs(detection, reference_tempi,
                                                    reference_weight,
                                                    estimated_tempi,
                                                    **kwargs)
  
      return scores
docs: Compute all metrics for the given reference and estimated annotations.
  
      Parameters
      ----------
      reference_tempi : np.ndarray, shape=(2,)
          Two non-negative reference tempi
  
      reference_weight : float > 0
          The relative strength of ``reference_tempi[0]`` vs
          ``reference_tempi[1]``.
  
      estimated_tempi : np.ndarray, shape=(2,)
          Two non-negative estimated tempi.
  
      kwargs
          Additional keyword arguments which will be passed to the
          appropriate metric or preprocessing functions.
  
      Returns
      -------
      scores : dict
          Dictionary of scores, where the key is the metric name (str) and
          the value is the (float) score achieved.