code: def iter_sublist(
      schema: dict, path: str, key: str, ctx: LintContext
  ) -> Errors:
      """Helper function to iter_schema()."""
  
      if key not in schema:
          return []
  
      child = schema[key]
      path += f".{key}"
  
      if not isinstance(child, list):
          return [
              (
                  path,
                  f"expected a list but got a {type(child).__name__}",
              )
          ]
  
      errors = []
  
      for idx, sub in enumerate(child):
          errors += iter_schema(sub, path + f"[{idx}]", ctx)
  
      return errors
  
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 14 for calling a global function with example usage: iter_sublist(schema, path, key, ctx) and returns: errors, list, list