/**
   * Get names that could have jet descriptor equivalents. It could be inaccurate and return more
   * results than necessary.
   */
  static Collection<String> getPossiblePackageDeclarationsNames(
      Project project, GlobalSearchScope scope) {
    Collection<String> result = new ArrayList<String>();

    for (PsiClass packageClass : getClassesForKotlinPackages(project, scope)) {
      for (PsiMethod psiMethod : packageClass.getMethods()) {
        if (psiMethod.getModifierList().hasModifierProperty(PsiModifier.STATIC)) {
          result.add(psiMethod.getName());
        }
      }
    }

    return result;
  }
  @Nullable
  static FqName getJetTopLevelDeclarationFQN(@NotNull PsiMethod method) {
    PsiClass containingClass = method.getContainingClass();

    if (containingClass != null) {
      String qualifiedName = containingClass.getQualifiedName();
      assert qualifiedName != null;

      FqName classFQN = new FqName(qualifiedName);

      if (JavaResolverPsiUtils.isCompiledKotlinPackageClass(containingClass)) {
        FqName classParentFQN = QualifiedNamesUtil.withoutLastSegment(classFQN);
        return QualifiedNamesUtil.combine(classParentFQN, Name.identifier(method.getName()));
      }
    }

    return null;
  }