void (@NotNull final MyLineRange toMove, @NotNull final Project project) { final PsiElement startElement = toMove.myStartElement; final PsiElement endElement = toMove.myEndElement; final PyStatementList initialScope = getStatementList(startElement); if (initialScope != null && !(startElement == endElement && startElement instanceof PsiComment)) { if (initialScope.getStatements().length == toMove.statementsSize) { final PyPassStatement passStatement = PyElementGenerator.getInstance(project).createPassStatement(); initialScope.addAfter(passStatement, initialScope.getStatements()[initialScope.getStatements().length - 1]); } } }