#NEWLINE# def get_prep_value( self , value ) : #NEWLINE# #INDENT# 'Return a wrapped, valid UUID value.' #NEWLINE# if ( not value ) : #NEWLINE# #INDENT# if ( self . null or self . _auto_add or ( self . default != NOT_PROVIDED ) ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# raise ValueError ( 'Explicit UUID required unless either `null` is True or `auto_add` is given.' ) #NEWLINE# #UNINDENT# if isinstance ( value , uuid . UUID ) : #NEWLINE# #INDENT# return value #NEWLINE# #UNINDENT# return uuid . UUID ( value )