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