code: def _occurrence_intersection(occ_P, occ_Q):
      
      set_P = set([tuple(onset_midi) for onset_midi in occ_P])
      set_Q = set([tuple(onset_midi) for onset_midi in occ_Q])
      return set_P & set_Q
docs: Computes the intersection between two occurrences.
  
      Parameters
      ----------
      occ_P : list of tuples
          (onset, midi) pairs representing the reference occurrence.
      occ_Q : list
          second list of (onset, midi) tuples
  
      Returns
      -------
      S : set
          Set of the intersection between occ_P and occ_Q.