def _CheckEnum(value, name, values=None):
 if (value not in values):
  raise ValueError(('%s, %r must be in %s' % (name, value, values)))
 return value

def _CheckEnum ( value , name , values = None ) : if ( value not in values ) : raise ValueError ( ( '%s, %r must be in %s' % ( name , value , values ) ) ) return value
checks whether value is a member of the set of values given .