code: private static boolean localNameIsDeclaredByClass(Node clazz) {
      checkArgument(clazz.isClass(), clazz);
  
      if (clazz.getFirstChild().isEmpty()) {
        return false; // There must be a name.
      } else if (NodeUtil.isStatement(clazz)) {
        return false; // The name must be local.
      }
  
      return true;
    }
docs: Returns {@code true} iff a CLASS subtree declares a name local to the class body.
  
  <p>Example:
  
  <pre>{@code
  const Foo = class Bar {
  qux() { return Bar; }
  }
  }</pre>