public static @Nullable PsiFile findRelativeFile(String uri, PsiElement base) {
    if (base instanceof PsiFile baseFile) {
      VirtualFile file = UriUtil.findRelative(uri, baseFile.getOriginalFile());
      if (file == null) return null;
      return base.getManager().findFile(file);
    }
    else if (base instanceof PsiDirectory baseDir) {
      VirtualFile file = UriUtil.findRelative(uri, baseDir);
      if (file == null) return null;
      return base.getManager().findFile(file);
    }

    return null;
  }
public static @Nullable PsiFile findRelativeFile(String uri, PsiElement base)