def _is_valid_cardinal(self, inpt, metadata):
if not isinstance(inpt, int):<EOL><INDENT>return False<EOL><DEDENT>if metadata.get_minimum_cardinal() and inpt < metadata.get_maximum_cardinal():<EOL><INDENT>return False<EOL><DEDENT>if metadata.get_maximum_cardinal() and inpt > metadata.get_minimum_cardinal():<EOL><INDENT>return False<EOL><DEDENT>if metadata.get_cardinal_set() and inpt not in metadata.get_cardinal_set():<EOL><INDENT>return False<EOL><DEDENT>else:<EOL><INDENT>return True<EOL><DEDENT>
Checks if input is a valid cardinal value