@Nullable
  public static List<? extends RatedResolveResult> resolveMemberInPackageOrModule(@Nullable PyImportedModule importedModule,
                                                                                  @NotNull PsiFileSystemItem anchor,
                                                                                  @NotNull String name,
                                                                                  @Nullable PyExpression location,
                                                                                  @NotNull PyResolveContext resolveContext) {


    final PyFile module = PyUtil.as(PyUtil.turnDirIntoInit(anchor), PyFile.class);
    if (module != null) {
      final PsiElement overridingMember = resolveByOverridingMembersProviders(module, name, resolveContext);
      if (overridingMember != null) {
        return ResolveResultList.to(overridingMember);
      }

      final List<RatedResolveResult> attributes = module.multiResolveName(name);
      if (!attributes.isEmpty()) {
        return attributes;
      }
    }


    if (PyUtil.isPackage(anchor, location)) {
      final ResolveResultList implicitMembers = new ResolveResultList();
      processImplicitPackageMembers(anchor, location, importedModule, n -> name.endsWith(n), results -> {
        implicitMembers.addAll(convertDirsToInit(results));
        return implicitMembers.isEmpty();
      });
      if (!implicitMembers.isEmpty()) {
        return implicitMembers;
      }
    }

    if (module != null) {
      final PsiElement member = resolveByMembersProviders(module, name, resolveContext);
      if (member != null) {
        return ResolveResultList.to(member);
      }
    }
    return null;
  }
@Nullable
  public static List<? extends RatedResolveResult> resolveMemberInPackageOrModule(@Nullable PyImportedModule importedModule,
                                                                                  @NotNull PsiFileSystemItem anchor,
                                                                                  @NotNull String name,
                                                                                  @Nullable PyExpression location,
                                                                                  @NotNull PyResolveContext resolveContext)