code: def get_children_graph(self, item_ids=None, language=None, forbidden_item_ids=None):
          if forbidden_item_ids is None:
              forbidden_item_ids = set()
          def _children(item_ids):
              if item_ids is None:
                  items = Item.objects.filter(active=True).prefetch_related('children')
              else:
                  item_ids = [ii for iis in item_ids.values() for ii in iis]
                  items = Item.objects.filter(id__in=item_ids, active=True).prefetch_related('children')
              return {
                  item.id: sorted([
                      _item.id for _item in item.children.all()
                      if _item.active and _item.id not in forbidden_item_ids
                  ])
                  for item in items if item.id not in forbidden_item_ids
              }
          if item_ids is None:
              return self._reachable_graph(None, _children, language=language)
          else:
              graph = self.get_children_graph(None, language, forbidden_item_ids=forbidden_item_ids)
              return self._subset_graph(graph, set(item_ids) - set(forbidden_item_ids))