@classmethod
def is_alias(cls, state):
    """Create a function that can be used as a alias for a in query.

            >>> class MyTracker(Tracker):
            ...     is_activated = Tracker.is_alias('active')
            ...
        """
    return lambda self, obj: self.in_state(state, obj)
