Help (@NotNull final PsiElement element) { if (!(element instanceof CommandLinePart commandLinePart)) { return null; } final Command realCommand = commandLinePart.findRealCommand(); if (realCommand == null) { return null; } final CommandLineElement commandLineElement = PyUtil.as(element, CommandLineElement.class); if (commandLineElement == null) { return null; } final MyCommandHelpObtainer helpObtainer = new MyCommandHelpObtainer(); commandLineElement.accept(helpObtainer); return helpObtainer.myResultHelp; }