def add_states_if(self, predicate, **states):
filtered_states = {<EOL>k: w for k,w in states.items()<EOL>if predicate(w)<EOL>}<EOL>self.add_states(**filtered_states)<EOL>
Add any of the given states that satisfy the given predicate.

The predicate should be callable (e.g. a function or lambda) that 
takes one of the given widgets as an argument, and returns a boolean 
indicating whether or not that widget should be added to the deck.  For 
example, this could be used to exclude widgets that don't have images:

>>> d = glooey.Deck('base')
>>> d.add_states_if(
...         lambda w: w.image is not None,
...         base=glooey.Image(path_or_none),
...         over=glooey.Image(path_or_none),
...         down=glooey.Image(path_or_none),
... )

See `add_state()` for more details.