'Returns dictionary state_group -> (dict of (type, state_key) -> event id)'

@defer.inlineCallbacks
def _get_state_groups_from_groups(self, groups, types):

    results = {}
    chunks = [groups[i:(i + 100)] for i in xrange(0, len(groups), 100)]
    for chunk in chunks:
        res = (yield self.runInteraction('_get_state_groups_from_groups', self._get_state_groups_from_groups_txn, chunk, types))
        results.update(res)
    defer.returnValue(results)
