code: Optional<JSType> expectAutoboxesToIterableOrAsyncIterable(Node n, JSType type, String msg) {
      MaybeBoxedIterableOrAsyncIterable maybeBoxed =
          JsIterables.maybeBoxIterableOrAsyncIterable(type, typeRegistry);
  
      if (maybeBoxed.isMatch()) {
        return Optional.of(maybeBoxed.getTemplatedType());
      }
  
      mismatch(n, msg, type, iterableOrAsyncIterable);
  
      return Optional.empty();
    }
docs: Expect the type to autobox to be an Iterable or AsyncIterable.
  
  @return The unwrapped variants of the iterable(s), or empty if not iterable.