code: def check_types_and_keywords(
      schema: dict, path: str, ctx: LintContext
  ) -> Errors:
      if "type" not in schema:
          return []
  
      types = schema["type"]
      if not isinstance(types, list):
          types = [types]
  
      for typ in types:
          if typ not in SUPPORTED_KEYWORDS_BY_TYPE:
              return [(path, f"unsupported type: {typ}")]
  
      keys = set(schema.keys()).difference(TOPLEVEL_KEYWORDS)
      keys.remove("type")
  
      for typ in types:
          keys = keys.difference(SUPPORTED_KEYWORDS_BY_TYPE[typ])
  
      errors = []
  
      for kw in keys:
          errors.append(
              (path, f"{kw} not allowed in schema of type {typ}")
          )
  
      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 9 for calling a global function with example usage: check_types_and_keywords(schema, path, ctx) and returns: errors, list, list