code: def build_macos_universal_binaries(
      opts: Opts,
      cmake_platform_to_root_path: Dict[str, str],
      cmake_platform_to_python_dev_paths: Dict[str, PythonDevPaths],
      cmd_runner: CmdRunner,
  ):
      host_platform = get_host_platform()
      if host_platform == "darwin-x86_64":
          cross_build_platform = "darwin-arm64"
      elif host_platform == "darwin-arm64":
          cross_build_platform = "darwin-x86_64"
      else:
          raise RuntimeError(
              "Building macOS universal binaries is supported only on darwin host platforms"
          )
  
      logging.info(
          f"Building macOS universal binaries on host platform {host_platform}"
      )
  
      host_build_root_dir = os.path.join(
          opts.build_root_dir, host_platform
      )
      mkdir_if_not_exists(
          host_build_root_dir, opts.verbose, opts.dry_run
      )
  
      host_build_opts = copy.copy(opts)
      host_build_opts.macos_universal_binaries = False
      host_build_opts.target_platform = host_platform
      host_build_opts.build_root_dir = host_build_root_dir
      host_build_opts.cmake_extra_args = copy.copy(
          host_build_opts.cmake_extra_args
      )
      if cmake_platform_to_root_path is not None:
          host_build_opts.cmake_extra_args += [
              f"-DCMAKE_FIND_ROOT_PATH={cmake_platform_to_root_path[host_platform]}"
          ]
      if cmake_platform_to_python_dev_paths is not None:
          host_build_opts.cmake_extra_args += [
              f"-DPython3_INCLUDE_DIR={cmake_platform_to_python_dev_paths[host_platform].include_path}",
              f"-DPython3_LIBRARY={cmake_platform_to_python_dev_paths[host_platform].library_path}",
          ]
  
      build(host_build_opts)
  
      cross_build_root_dir = os.path.join(
          opts.build_root_dir, cross_build_platform
      )
      mkdir_if_not_exists(
          cross_build_root_dir, opts.verbose, opts.dry_run
      )
  
      cross_build_opts = copy.copy(opts)
      cross_build_opts.macos_universal_binaries = False
      cross_build_opts.target_platform = cross_build_platform
      cross_build_opts.build_root_dir = cross_build_root_dir
      cross_build_opts.cmake_extra_args = copy.copy(
          cross_build_opts.cmake_extra_args
      )
      if cmake_platform_to_root_path is not None:
          cross_build_opts.cmake_extra_args += [
              f"-DCMAKE_FIND_ROOT_PATH={cmake_platform_to_root_path[cross_build_platform]}"
          ]
      if cmake_platform_to_python_dev_paths is not None:
          cross_build_opts.cmake_extra_args += [
              f"-DPython3_INCLUDE_DIR={cmake_platform_to_python_dev_paths[cross_build_platform].include_path}",
              f"-DPython3_LIBRARY={cmake_platform_to_python_dev_paths[cross_build_platform].library_path}",
          ]
      if cross_build_opts.native_built_tools_root_dir is None:
          cross_build_opts.native_built_tools_root_dir = (
              os.path.abspath(host_build_opts.build_root_dir)
          )
  
      cross_build(cross_build_opts, cmd_runner)
  
      lipo(opts, cmd_runner)
  
imports: import argparse
  import copy
  import logging
  import os
  import platform
  import subprocess
  import sys
  import tempfile
  from typing import Dict
label_desc: Use image node_id 5 for calling a global function with example usage: build_macos_universal_binaries(opts, cmake_platform_to_root_path, cmake_platform_to_python_dev_paths, cmd_runner) without return types