docs: public static List<MethodNode> filterMethodsByVisibility(List<MethodNode> methodNodeList, ClassNode enclosingClassNode) {
          if (!asBoolean(methodNodeList)) {
              return StaticTypeCheckingVisitor.EMPTY_METHODNODE_LIST;
          }
  
          List<MethodNode> result = new LinkedList<>();
  
          boolean isEnclosingInnerClass = enclosingClassNode instanceof InnerClassNode;
          List<ClassNode> outerClasses = enclosingClassNode.getOuterClasses();
  
          outer:
          for (MethodNode methodNode : methodNodeList) {
              if (methodNode instanceof ExtensionMethodNode) {
                  result.add(methodNode);
                  continue;
              }
  
              ClassNode declaringClass = methodNode.getDeclaringClass();
  
              if (isEnclosingInnerClass) {
                  for (ClassNode outerClass : outerClasses) {
                      if (outerClass.isDerivedFrom(declaringClass)) {
                          if (outerClass.equals(declaringClass)) {
                              result.add(methodNode);
                              continue outer;
                          } else {
                              if (methodNode.isPublic() || methodNode.isProtected()) {
                                  result.add(methodNode);
                                  continue outer;
                              }
                          }
                      }
                  }
              }
  
              if (declaringClass instanceof InnerClassNode) {
                  if (declaringClass.getOuterClasses().contains(enclosingClassNode)) {
                      result.add(methodNode);
                      continue;
                  }
              }
  
              if (methodNode.isPrivate() && !enclosingClassNode.equals(declaringClass)) {
                  continue;
              }
              if (methodNode.isProtected()
                      && !enclosingClassNode.isDerivedFrom(declaringClass)
                      && !samePackageName(enclosingClassNode, declaringClass)) {
                  continue;
              }
              if (methodNode.isPackageScope() && !samePackageName(enclosingClassNode, declaringClass)) {
                  continue;
              }
  
              result.add(methodNode);
          }
  
          return result;
      }