'Create a block.
This method accumulates transactions to put in a block and outputs
a block when one of the following conditions is true:
- the size limit of the block has been reached, or
- a timeout happened.
Args:
tx (:class:`~bigchaindb.models.Transaction`): the transaction
to validate, might be None if a timeout happens.
timeout (bool): ``True`` if a timeout happened
(Default: ``False``).
Returns:
:class:`~bigchaindb.models.Block`: The block,
if a block is ready, or ``None``.'

def create(self, tx, timeout=False):

    txs = self.txs.send(tx)
    if ((len(txs) == 1000) or (timeout and txs)):
        block = self.bigchain.create_block(txs)
        self.txs = tx_collector()
        return block
