<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def iter_referents(self):
 """ Generates target sets that are compatible with the current beliefstate. """

        tlow, thigh = self['targetset_arity'].get_tuple()
        clow, chigh = self['contrast_arity'].get_tuple()

        referents = list(self.iter_singleton_referents())
        t = len(referents)
        low = max(1, tlow)
        high = min([t,  thigh])

        for targets in itertools.chain.from_iterable(itertools.combinations(referents, r) \
            for r in reversed(xrange(low, high+1))):
            if clow <= t-len(targets) <= chigh:
                yield  targets