private static NodeIterator getIterator(PsiStatement statement) {
    if (statement instanceof PsiExpressionListStatement expressionListStatement) {
      return new ArrayBackedNodeIterator(expressionListStatement.getExpressionList().getExpressions());
    }
    else if (statement instanceof PsiExpressionStatement expressionStatement) {
      return SingleNodeIterator.create(expressionStatement.getExpression());
    }
    else if (statement instanceof PsiEmptyStatement) {
      return SingleNodeIterator.EMPTY;
    }
    else {
      return SingleNodeIterator.create(statement);
    }
  }
private static NodeIterator getIterator(PsiStatement statement)