code: def generate_vegalite_schema_wrapper(schema_file: str) -> str:
      """Generate a schema wrapper at the given path."""
      # TODO: generate simple tests for each wrapper
      basename = "VegaLiteSchema"
  
      rootschema = load_schema_with_shorthand_properties(schema_file)
  
      definitions: Dict[str, SchemaGenerator] = {}
  
      for name in rootschema["definitions"]:
          defschema = {"$ref": "#/definitions/" + name}
          defschema_repr = {"$ref": "#/definitions/" + name}
          name = get_valid_identifier(name)
          definitions[name] = SchemaGenerator(
              name,
              schema=defschema,
              schemarepr=defschema_repr,
              rootschema=rootschema,
              basename=basename,
              rootschemarepr=CodeSnippet(
                  "{}._rootschema".format(basename)
              ),
          )
  
      graph: Dict[str, List[str]] = {}
  
      for name, schema in definitions.items():
          graph[name] = []
          for child_name in schema.subclasses():
              child_name = get_valid_identifier(child_name)
              graph[name].append(child_name)
              child: SchemaGenerator = definitions[child_name]
              if child.basename == basename:
                  child.basename = [name]
              else:
                  assert isinstance(child.basename, list)
                  child.basename.append(name)
  
      contents = [
          HEADER,
          "from typing import Any, Literal, Union, Protocol, Sequence, List",
          "from typing import Dict as TypingDict",
          "from typing import Generator as TypingGenerator" "",
          "from altair.utils.schemapi import SchemaBase, Undefined, UndefinedType, _subclasses",
          LOAD_SCHEMA.format(schemafile="vega-lite-schema.json"),
      ]
      contents.append(PARAMETER_PROTOCOL)
      contents.append(BASE_SCHEMA.format(basename=basename))
      contents.append(
          schema_class(
              "Root",
              schema=rootschema,
              basename=basename,
              schemarepr=CodeSnippet("{}._rootschema".format(basename)),
          )
      )
  
      for name in toposort(graph):
          contents.append(definitions[name].schema_class())
  
      contents.append("")  # end with newline
      return "\n".join(contents)
  
imports: import argparse
  import copy
  import json
  import os
  import re
  import sys
  import textwrap
  from dataclasses import dataclass
  from os.path import abspath, dirname, join
  from typing import Dict, Final, List, Literal, Optional, Tuple, Type, Union
  from urllib import request
  import m2r
  from schemapi import codegen
  from schemapi.codegen import CodeSnippet
  from schemapi.utils import SchemaInfo, get_valid_identifier, resolve_references, ruff_format_str, rst_syntax_for_class, indent_docstring
label_desc: Use image node_id 11 for calling a global function with example usage: generate_vegalite_schema_wrapper(schema_file) and returns: str