def val_to_py(val):
 if (isinstance(val, collections.Sequence) and (len(val) == 2)):
  if (val[0] == 'uuid'):
   return uuid.UUID(val[1])
  elif (val[0] == 'set'):
   return [val_to_py(x) for x in val[1]]
  elif (val[0] == 'map'):
   return {val_to_py(x): val_to_py(y) for (x, y) in val[1]}
 return val

def val_to_py ( val ) : if ( isinstance ( val , collections . Sequence ) and ( len ( val ) == 2 ) ) : if ( val [ 0 ] == 'uuid' ) : return uuid . UUID ( val [ 1 ] ) elif ( val [ 0 ] == 'set' ) : return [ val_to_py ( x ) for x in val [ 1 ] ] elif ( val [ 0 ] == 'map' ) : return { val_to_py ( x ) : val_to_py ( y ) for ( x , y ) in val [ 1 ] } return val
convert a json ovsdb return value to native python object .