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