'Converts a Transaction\'s outputs to spendable inputs.
Note:
Takes the Transaction\'s outputs and derives inputs
from that can then be passed into `Transaction.transfer` as
`inputs`.
A list of integers can be passed to `indices` that
defines which outputs should be returned as inputs.
If no `indices` are passed (empty list or None) all
outputs of the Transaction are returned.
Args:
indices (:obj:`list` of int): Defines which
outputs should be returned as inputs.
Returns:
:obj:`list` of :class:`~bigchaindb.common.transaction.
Input`'

def to_inputs(self, indices=None):

    indices = (indices or range(len(self.outputs)))
    return [Input(self.outputs[idx].fulfillment, self.outputs[idx].public_keys, TransactionLink(self.id, idx)) for idx in indices]
