code: def findall_operations_between(self,
                                     start_frontier: Dict[ops.Qid, int],
                                     end_frontier: Dict[ops.Qid, int],
                                     omit_crossing_operations: bool = False
                                     ) -> List[Tuple[int, ops.Operation]]:
          result = BucketPriorityQueue[ops.Operation](
              drop_duplicate_entries=True)
          involved_qubits = set(start_frontier.keys()) | set(end_frontier.keys())
          for q in sorted(involved_qubits):
              for i in range(start_frontier.get(q, 0),
                             end_frontier.get(q, len(self))):
                  op = self.operation_at(q, i)
                  if op is None:
                      continue
                  if (omit_crossing_operations and
                          not involved_qubits.issuperset(op.qubits)):
                      continue
                  result.enqueue(i, op)
          return list(result)