void (PyElement element) { VirtualFile vFile = element.getContainingFile().getVirtualFile(); myCurrentFilePath = vFile != null ? vFile.getPath() : null; if (myVisitedFiles.contains(element)) { return; } myVisitedFiles.add((PyFile)element.getContainingFile()); PyElement statementContainer = element instanceof PyFunction ? ((PyFunction)element).getStatementList() : element; statementContainer.acceptChildren(new MyPyElementVisitor()); }