def get_all_related_many_to_many_objects(self, local_only=False):
        try:
            cache = self._related_many_to_many_cache
        except __HOLE__:
            cache = self._fill_related_many_to_many_cache()
        if local_only:
            return [k for k, v in cache.items() if not v]
        return cache.keys()
dataset/ETHPy150Open CollabQ/CollabQ/vendor/django/db/models/options.py/Options.get_all_related_many_to_many_objects