'Transforms the object to a Python dictionary.
Note:
A dictionary serialization of the Input the Output was
derived from is always provided.
Returns:
dict: The Output as an alternative serialization format.'

def to_dict(self):

    condition = {}
    try:
        condition['details'] = _fulfillment_to_details(self.fulfillment)
    except AttributeError:
        pass
    try:
        condition['uri'] = self.fulfillment.condition_uri
    except AttributeError:
        condition['uri'] = self.fulfillment
    output = {'public_keys': self.public_keys, 'condition': condition, 'amount': str(self.amount)}
    return output
