List<PyStatementPart> (@NotNull PyIfStatement statement) { List<PyStatementPart> parts = new ArrayList<>(); parts.add(statement.getIfPart()); parts.addAll(Arrays.asList(statement.getElifParts())); PyElsePart elsePart = statement.getElsePart(); if (elsePart != null) { parts.add(elsePart); } return parts; }