@NotNull
  private static List<? extends RatedResolveResult> resolveMetaclassDunderCall(@NotNull PyClassType type,
                                                                               @Nullable PyExpression location,
                                                                               @NotNull PyResolveContext resolveContext) {
    final var context = resolveContext.getTypeEvalContext();

    final PyClassLikeType metaClassType = type.getMetaClassType(context, true);
    if (metaClassType == null) return Collections.emptyList();

    final PyClassType typeType = PyBuiltinCache.getInstance(type.getPyClass()).getTypeType();
    if (metaClassType == typeType) return Collections.emptyList();

    final var results = resolveDunderCall(metaClassType, location, resolveContext);
    if (results.isEmpty()) return Collections.emptyList();

    final Set<PsiElement> typeDunderCall =
      typeType == null
      ? Collections.emptySet()
      : ContainerUtil.map2SetNotNull(resolveDunderCall(typeType, null, resolveContext), RatedResolveResult::getElement);

    return ContainerUtil.filter(
      results,
      it -> {
        final var element = it.getElement();
        return !typeDunderCall.contains(element) && !ParamHelper.isSelfArgsKwargsCallable(element, context);
      }
    );
  }
@NotNull
  private static List<? extends RatedResolveResult> resolveMetaclassDunderCall(@NotNull PyClassType type,
                                                                               @Nullable PyExpression location,
                                                                               @NotNull PyResolveContext resolveContext)