code: def build(
      implementations=None,
      build_type=None,
      build_isolation=None,
      venv_quick=False,
  ):
      """
      Args:
          build_type:
              See top-level option `-b`.
          build_isolation:
              See top-level option `--build-isolation`.
          venv_quick:
              See top-level option `-v`.
  
      """
      print(f"{build_type=}")
      print(f"{build_isolation=}")
  
      if platform.system() == "OpenBSD":
          # libclang not available on pypi.org, so we need to force use of system
          # package py3-llvm with --no-build-isolation, manually installing other
          # required packages.
          if build_isolation is None:
              build_isolation = False
  
      if build_isolation:
          # This is the default on non-OpenBSD.
          build_isolation_text = ""
      else:
          # Not using build isolation - i.e. pip will not be using its own clean
          # venv, so we need to explicitly install required packages.  Manually
          # install required packages from pyproject.toml.
          names = get_pyproject_required()
          if platform.system() == "OpenBSD":
              # libclang not available. We require system already has py3-llvm
              # installed.
              log(
                  f"OpenBSD: libclang not available; assuming system package py3-llvm is installed."
              )
              names = names.replace("libclang", "")
          if venv_quick:
              log(
                  f"{venv_quick=}: Not installing packages with pip: {names}"
              )
          else:
              gh_release.run(f"python -m pip install --upgrade {names}")
          build_isolation_text = " --no-build-isolation"
  
      env_extra = dict()
      if implementations:
          v = ""
          if "c" in implementations:
              v += "a"
          if "r" in implementations or "R" in implementations:
              v += "b"
          env_extra["PYMUPDF_SETUP_IMPLEMENTATIONS"] = v
      if build_type:
          env_extra["PYMUPDF_SETUP_MUPDF_BUILD_TYPE"] = build_type
      gh_release.run(
          f"pip install{build_isolation_text} -vv {pymupdf_dir}",
          env_extra=env_extra,
      )
  
file_path: pymudf/scripts/test.py
imports: import gh_release
  import os
  import platform
  import re
  import subprocess
  import sys
  import textwrap
label_desc: Use image node_id 4 for calling a global function with example usage: build(implementations, build_type, build_isolation, venv_quick) without return types