boolean (PyClass pyClass) { for (PyFunction cls : pyClass.getMethods()) { if (isDocTestFunction(cls)) { return true; } } if (pyClass.getDocStringExpression() != null) { PyStringLiteralExpression docString = pyClass.getDocStringExpression(); if (docString != null && hasExample(docString.getStringValue())) { return true; } } return false; }