code: def batch_insert_into(self,
                            insert_intos: Iterable[Tuple[int, ops.Operation]]
                            ) -> None:
          
          copy = self.copy()
          for i, op in insert_intos:
              copy._moments[i] = copy._moments[i].with_operation(op)
          self._device.validate_circuit(copy)
          self._moments = copy._moments
docs: Inserts operations into empty spaces in existing moments.
  
          If any of the insertions fails (due to colliding with an existing
          operation), this method fails without making any changes to the circuit.
  
          Args:
              insert_intos: A sequence of (moment_index, new_operation)
                  pairs indicating a moment to add a new operation into.
  
          ValueError:
              One of the insertions collided with an existing operation.
  
          IndexError:
              Inserted into a moment index that doesn't exist.