code: def _check_emscripten() -> None:
      if EMSCRIPTEN_ROOT is _MISSING:
          raise MissingDependency(
              "Emscripten SDK EM_CONFIG", INSTALL_EMSDK
          )
      # sanity check
      emconfigure = EMSCRIPTEN.configure_wrapper
      if emconfigure is not None and not emconfigure.exists():
          raise MissingDependency(os.fspath(emconfigure), INSTALL_EMSDK)
      # version check
      version_txt = EMSCRIPTEN_ROOT / "emscripten-version.txt"
      if not version_txt.exists():
          raise MissingDependency(os.fspath(version_txt), INSTALL_EMSDK)
      with open(version_txt) as f:
          version = f.read().strip().strip('"')
      if version.endswith("-git"):
          # git / upstream / tot-upstream installation
          version = version[:-4]
      version_tuple = cast(
          Tuple[int, int, int],
          tuple(int(v) for v in version.split(".")),
      )
      if version_tuple < EMSDK_MIN_VERSION:
          raise ConditionError(
              os.fspath(version_txt),
              f"Emscripten SDK {version} in '{EMSCRIPTEN_ROOT}' is older than "
              "minimum required version "
              f"{'.'.join(str(v) for v in EMSDK_MIN_VERSION)}.",
          )
      broken = EMSDK_BROKEN_VERSION.get(version_tuple)
      if broken is not None:
          raise ConditionError(
              os.fspath(version_txt),
              (
                  f"Emscripten SDK {version} in '{EMSCRIPTEN_ROOT}' has known "
                  f"bugs, see {broken}."
              ),
          )
      if os.environ.get("PKG_CONFIG_PATH"):
          warnings.warn(
              "PKG_CONFIG_PATH is set and not empty. emconfigure overrides "
              "this environment variable. Use EM_PKG_CONFIG_PATH instead."
          )
      _check_clean_src()
  
imports: import argparse
  import enum
  import dataclasses
  import logging
  import os
  import pathlib
  import re
  import shlex
  import shutil
  import socket
  import subprocess
  import sys
  import sysconfig
  import tempfile
  import time
  import warnings
  import webbrowser
  from typing import cast, Any, Callable, Dict, Iterable, List, Optional, Tuple, Union
label_desc: Use image node_id 5 for calling a global function with example usage: _check_emscripten() without return types