code: def _input_valid(input_, operation, message, 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 == Transaction.CREATE:
              # NOTE: In the case of a `CREATE` transaction, the
              #       output is always valid.
              output_valid = True
          else:
              output_valid = output_condition_uri == ccffill.condition_uri
  
          message = sha3_256(message.encode())
          if input_.fulfills:
              message.update('{}{}'.format(
                  input_.fulfills.txid, input_.fulfills.output).encode())
  
          # NOTE: We pass a timestamp to `.validate`, as in case of a timeout
          #       condition we'll have to validate against it
  
          # cryptoconditions makes no assumptions of the encoding of the
          # message to sign or verify. It only accepts bytestrings
          ffill_valid = parsed_ffill.validate(message=message.digest())
          return output_valid and ffill_valid
docs: Validates a single Input against a single Output.
  
              Note:
                  In case of a `CREATE` 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.
                  message (str): The fulfillment message.
                  output_condition_uri (str, optional): An Output to check the
                      Input against.
  
              Returns:
                  bool: If the Input is valid.