code: def check_compareProperties(
      schema: dict, path: str, ctx: LintContext
  ) -> Errors:
      if "compareProperties" not in schema:
          return []
  
      compare = schema["compareProperties"]
      subpath = path + ".compareProperties"
  
      errors = []  # type: Errors
  
      if "type" not in compare:
          errors.append((subpath, "has no type"))
      if "a" not in compare:
          errors.append((subpath, "has no a"))
      if "b" not in compare:
          errors.append((subpath, "has no b"))
      if compare["type"] not in {
          "a<b",
          "a<=b",
          "a_is_subdir_of_b",
      }:
          errors.append((subpath, f'invalid type: {compare["type"]}'))
  
      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 12 for calling a global function with example usage: check_compareProperties(schema, path, ctx) and returns: errors, list