code: def _disallow_state(self, state):
          
          disallow_methods = (self._is_duplicate_board,
                              self._is_impossible_by_count)
          for disallow_method in disallow_methods:
              if disallow_method(state):
                  return True
          return False
docs: Disallow states that are not useful to continue simulating.