def wrap_metadata_signature(obj, value):
    """Wrap profile value with metadata/signature"""
    if isinstance(value, dict) or isinstance(value, list):
        value_key = 'values'
    else:
        value_key = 'value'
    return {value_key: value, 'metadata': obj.metadata(), 'signature': obj.
        signature()}
