@Nullable
  public static PsiElement findTighterDeclarationLocation(@NotNull PsiElement sibling, @NotNull PsiVariable variable,
                                                          boolean skipDeclarationStatements) {
    PsiElement prevSibling = sibling.getPrevSibling();
    while (prevSibling instanceof PsiWhiteSpace || prevSibling instanceof PsiComment) {
      prevSibling = prevSibling.getPrevSibling();
    }
    if (prevSibling instanceof PsiDeclarationStatement) {
      if (prevSibling.equals(variable.getParent())) {
        return null;
      }
      if (skipDeclarationStatements) {
        return findTighterDeclarationLocation(prevSibling, variable, true);
      }
    }
    return prevSibling;
  }
@Nullable
  public static PsiElement findTighterDeclarationLocation(@NotNull PsiElement sibling, @NotNull PsiVariable variable,
                                                          boolean skipDeclarationStatements)