@Nullable
  public Library findLibrary(@NotNull ModulesProvider modulesProvider,
                             @NotNull PackagingElementResolvingContext.LibraryFinder libraryFinder) {
    String level = myLevel;
    String myLibraryName1 = myLibraryName;
    String moduleName = myModuleName;

    if (myStorage != null) {
      LibraryFilesPackagingElementEntity entity = (LibraryFilesPackagingElementEntity)getThisEntity();
      level = getMyLevel(entity);
      myLibraryName1 = getMyLibraryName(entity);
      moduleName = getMyModuleName(entity);
    }

    if (moduleName == null && level != null && myLibraryName1 != null) {
      return libraryFinder.find(level, myLibraryName1);
    }
    final Module module;
    if (moduleName != null) {
      module = modulesProvider.getModule(moduleName);
      if (module != null) {
        for (OrderEntry entry : modulesProvider.getRootModel(module).getOrderEntries()) {
          if (entry instanceof LibraryOrderEntry libraryEntry && libraryEntry.isModuleLevel()) {
            final String libraryName = libraryEntry.getLibraryName();
            if (libraryName != null && libraryName.equals(myLibraryName)) {
              return libraryEntry.getLibrary();
            }
          }
        }
      }
    }
    return null;
  }
@Nullable
  public Library findLibrary(@NotNull ModulesProvider modulesProvider,
                             @NotNull PackagingElementResolvingContext.LibraryFinder libraryFinder)