def _ctab_atom_bond_block(number_of_lines, block_type, stream):
    """Process atom and bond blocks of ``Ctab``.

    :param number_of_lines: Number of lines to process from stream.
    :param block_type: :py:class:`collections.namedtuple` to use for data processing.
    :type block_type: :class:`~ctfile.tokenizer.CtabAtomBlockLine` or :class:`~ctfile.tokenizer.CtabBondBlockLine`
    :param stream: Queue containing lines of text.
    :type stream: :py:class:`collections.deque`
    :return: Tuples of data.
    :rtype: :class:`~ctfile.tokenizer.CtabAtomBlockLine` or :class:`~ctfile.tokenizer.CtabBondBlockLine`
    """
    for _ in range(int(number_of_lines)):
        line = stream.popleft()
        yield block_type(*line.split())