<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def are_all_matches_terminal(self, predicate: Callable[[ops.Operation], bool]):
 """Check whether all of the ops that satisfy a predicate are terminal. Args: predicate: A predicate on ops.Operations which is being checked. Returns: Whether or not all `Operation` s in a circuit that satisfy the given predicate are terminal. """

        return all(
            self.next_moment_operating_on(op.qubits, i + 1) is None for
            (i, op) in self.findall_operations(predicate)
        )