code: def findall_operations_with_gate_type(
              self,
              gate_type: Type[T_DESIRED_GATE_TYPE]
      ) -> Iterable[Tuple[int,
                          ops.GateOperation,
                          T_DESIRED_GATE_TYPE]]:
          
          result = self.findall_operations(lambda operation: bool(
              ops.op_gate_of_type(operation, gate_type)))
          for index, op in result:
              gate_op = cast(ops.GateOperation, op)
              yield index, gate_op, cast(T_DESIRED_GATE_TYPE, gate_op.gate)
docs: Find the locations of all gate operations of a given type.
  
          Args:
              gate_type: The type of gate to find, e.g. XPowGate or
                  MeasurementGate.
  
          Returns:
              An iterator (index, operation, gate)'s for operations with the given
              gate type.