code: def check_schema(schema: dict, path: str, ctx: LintContext) -> Errors:
      if not ctx.toplevel:
          return []
  
      if "$schema" not in schema:
          return [(path, "$schema is missing")]
  
      exp_schema = "http://json-schema.org/draft-07/schema#"
  
      if schema["$schema"] != exp_schema:
          return [(path, f'$schema is not "{exp_schema}"')]
  
      return []
  
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 2 for calling a global function with example usage: check_schema(schema, path, ctx) and returns: list, list, list, list