code: def validate_tempi(tempi, reference=True):
      
  
      if tempi.size != 2:
          raise ValueError('tempi must have exactly two values')
  
      if not np.all(np.isfinite(tempi)) or np.any(tempi < 0):
          raise ValueError('tempi={} must be non-negative numbers'.format(tempi))
  
      if reference and np.all(tempi == 0):
          raise ValueError('reference tempi={} must have one'
                           ' value greater than zero'.format(tempi))
docs: Checks that there are two non-negative tempi.
      For a reference value, at least one tempo has to be greater than zero.
  
      Parameters
      ----------
      tempi : np.ndarray
          length-2 array of tempo, in bpm
  
      reference : bool
          indicates a reference value