boolean (@NotNull List<PyStackFrameInfo> frames) { for (PyStackFrameInfo frameInfo : frames) { if (SET_UP_AND_TEAR_DOWN_FUNCTIONS_BY_FRAMEWORK.values().stream().anyMatch(names -> names.contains(frameInfo.getName()))) return true; } return false; }