code: def vegalite_main(skip_download: bool = False) -> None:
      version = SCHEMA_VERSION
      path = abspath(
          join(
              dirname(__file__),
              "..",
              "altair",
              "vegalite",
              version.split(".")[0],
          )
      )
      schemapath = os.path.join(path, "schema")
      schemafile = download_schemafile(
          version=version,
          schemapath=schemapath,
          skip_download=skip_download,
      )
  
      # Generate __init__.py file
      outfile = join(schemapath, "__init__.py")
      print("Writing {}".format(outfile))
      content = [
          "# ruff: noqa\n",
          "from .core import *\nfrom .channels import *  # type: ignore[assignment]\n",
          f"SCHEMA_VERSION = '{version}'\n",
          "SCHEMA_URL = {!r}\n" "".format(schema_url(version)),
      ]
      with open(outfile, "w", encoding="utf8") as f:
          f.write(ruff_format_str(content))
  
      # Generate the core schema wrappers
      outfile = join(schemapath, "core.py")
      print("Generating\n {}\n  ->{}".format(schemafile, outfile))
      file_contents = generate_vegalite_schema_wrapper(schemafile)
      with open(outfile, "w", encoding="utf8") as f:
          f.write(ruff_format_str(file_contents))
  
      # Generate the channel wrappers
      outfile = join(schemapath, "channels.py")
      print("Generating\n {}\n  ->{}".format(schemafile, outfile))
      code = generate_vegalite_channel_wrappers(
          schemafile, version=version
      )
      with open(outfile, "w", encoding="utf8") as f:
          f.write(ruff_format_str(code))
  
      # generate the mark mixin
      markdefs = {
          k: k + "Def"
          for k in ["Mark", "BoxPlot", "ErrorBar", "ErrorBand"]
      }
      outfile = join(schemapath, "mixins.py")
      print("Generating\n {}\n  ->{}".format(schemafile, outfile))
      mark_imports, mark_mixin = generate_vegalite_mark_mixin(
          schemafile, markdefs
      )
      config_imports, config_mixin = generate_vegalite_config_mixin(
          schemafile
      )
      try_except_imports = [
          "if sys.version_info >= (3, 11):",
          "    from typing import Self",
          "else:",
          "    from typing_extensions import Self",
      ]
      stdlib_imports = ["import sys"]
      imports = sorted(set(mark_imports + config_imports))
      content = [
          HEADER,
          "\n".join(stdlib_imports),
          "\n\n",
          "\n".join(imports),
          "\n\n",
          "\n".join(try_except_imports),
          "\n\n\n",
          mark_mixin,
          "\n\n\n",
          config_mixin,
      ]
      with open(outfile, "w", encoding="utf8") as f:
          f.write(ruff_format_str(content))
  
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 15 for calling a global function with example usage: vegalite_main(skip_download) without return types