@Override
  protected Object @NotNull [] buildChildren(@NotNull HierarchyNodeDescriptor descriptor) {
    final List<PyHierarchyNodeDescriptor> descriptors = new ArrayList<>();
    if (descriptor instanceof PyHierarchyNodeDescriptor pyDescriptor) {
      final PsiElement element = pyDescriptor.getPsiElement();
      final boolean isCallable = element instanceof PyFunction || element instanceof PyClass || element instanceof PyFile;
      HierarchyNodeDescriptor nodeDescriptor = getBaseDescriptor();
      if (!(element instanceof PyElement) || !isCallable || nodeDescriptor == null) {
        return ArrayUtilRt.EMPTY_OBJECT_ARRAY;
      }

      final Map<PsiElement, Collection<PsiElement>> children = getChildren((PyElement)element);

      final HashMap<PsiElement, PyHierarchyNodeDescriptor> callerToDescriptorMap = new HashMap<>();
      PsiElement baseClass = element instanceof PyFunction ? ((PyFunction)element).getContainingClass() : null;

      children.forEach((caller, usages) -> {
        if (isInScope(baseClass, caller, myScopeType)) {
          PyHierarchyNodeDescriptor callerDescriptor = callerToDescriptorMap.get(caller);
          if (callerDescriptor == null) {
            callerDescriptor = new PyHierarchyNodeDescriptor(descriptor, caller, usages, false);
            callerToDescriptorMap.put(caller, callerDescriptor);
            descriptors.add(callerDescriptor);
          }
        }
      });
    }
    return ArrayUtil.toObjectArray(descriptors);
  }
@Override
  protected Object @NotNull [] buildChildren(@NotNull HierarchyNodeDescriptor descriptor)