'Validates a single Input against a single Output.
Note:
In case of a `CREATE` or `GENESIS` Transaction, this method
does not validate against `output_condition_uri`.
Args:
input_ (:class:`~bigchaindb.common.transaction.
Input`) The Input to be signed.
operation (str): The type of Transaction.
tx_serialized (str): The Transaction used as a message when
initially signing it.
output_condition_uri (str, optional): An Output to check the
Input against.
Returns:
bool: If the Input is valid.'

@staticmethod
def _input_valid(input_, operation, tx_serialized, output_condition_uri=None):

    ccffill = input_.fulfillment
    try:
        parsed_ffill = Fulfillment.from_uri(ccffill.serialize_uri())
    except (TypeError, ValueError, ParsingError, ASN1DecodeError, ASN1EncodeError):
        return False
    if (operation in (Transaction.CREATE, Transaction.GENESIS)):
        output_valid = True
    else:
        output_valid = (output_condition_uri == ccffill.condition_uri)
    ffill_valid = parsed_ffill.validate(message=tx_serialized.encode())
    return (output_valid and ffill_valid)
