code: def iter_union(schema: dict, path: str, ctx: LintContext) -> Errors:
      """Helper function to iter_schema()."""
  
      if "union" not in schema:
          return []
  
      child = schema["union"]
      path += ".union"
  
      if not isinstance(child, dict):
          return [
              (
                  path,
                  f"expected a dict but got a {type(child).__name__}",
              )
          ]
  
      return iter_sublist(child, path, "items", ctx)
  
imports: import argparse
  import json
  import os
  import re
  import sys
  from typing import Callable, List, Optional, Tuple, TypeVar, Union
label_desc: Use image node_id 16 for calling a global function with example usage: iter_union(schema, path, ctx) and returns: iter_sublist, list, list