code: private static boolean isInsideInstanceMember(Node n) {
      while (n != null) {
        if (n.isMemberFunctionDef()
            || n.isGetterDef()
            || n.isSetterDef()
            || n.isComputedProp()) {
          return !n.isStaticMember();
        }
        if (n.isClass()) {
          // Stop at the first enclosing class.
          return false;
        }
        n = n.getParent();
      }
      return false;
    }
docs: Returns true if this node is or is enclosed by an instance member definition
  (non-static method, getter or setter).