def is_value_in(constants_group, value):
for const_value, label in constants_group:<EOL><INDENT>if const_value == value:<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Checks whether value can be found in the given constants group, which in
turn, should be a Django-like choices tuple.