code: def make_wheel(
      wheel_name,
      pkg_name,
      ver,
      build_system,
      arc_root,
      dst_so_modules,
      should_build_widget,
  ):
      with tempfile.TemporaryDirectory() as dir_path:
          # Create py files
          os.makedirs(os.path.join(dir_path, pkg_name))
  
          catboost_package_dir = os.path.join(
              arc_root, "catboost/python-package"
          )
          for file_name in [
              "__init__.py",
              "version.py",
              "core.py",
              "datasets.py",
              "utils.py",
              "eval",
              "widget/__init__.py",
              "widget/ipythonwidget.py",
              "widget/metrics_plotter.py",
              "widget/callbacks.py",
              "metrics.py",
              "monoforest.py",
              "plot_helpers.py",
              "text_processing.py",
          ]:
              src = os.path.join(
                  catboost_package_dir, "catboost", file_name
              )
              dst = os.path.join(dir_path, pkg_name, file_name)
              if not os.path.exists(os.path.dirname(dst)):
                  os.makedirs(os.path.dirname(dst))
  
              if os.path.isdir(src):
                  shutil.copytree(src, dst)
              else:
                  shutil.copy(src, dst)
  
          hnsw_package_dir = os.path.join(
              arc_root, "library/python/hnsw/hnsw"
          )
          hnsw_dst_dir = os.path.join(dir_path, pkg_name, "hnsw")
          os.makedirs(hnsw_dst_dir)
          for file_name in ["__init__.py", "hnsw.py"]:
              src = os.path.join(hnsw_package_dir, file_name)
              dst = os.path.join(hnsw_dst_dir, file_name)
              shutil.copy(src, dst)
  
          # Create so files
          py_trait = PythonTrait(build_system, "", "", [])
          for module_name, (
              built_so_path,
              dst_subdir,
          ) in dst_so_modules.items():
              dst_so_name = py_trait.dst_so_name(module_name)
              shutil.copy(
                  built_so_path,
                  os.path.join(
                      dir_path, pkg_name, dst_subdir, dst_so_name
                  ),
              )
  
          # Create metadata
          dist_info_dir = os.path.join(
              dir_path, "{}-{}.dist-info".format(pkg_name, ver)
          )
          shutil.copytree(
              os.path.join(
                  catboost_package_dir,
                  "for_mk_wheel",
                  "catboost.dist-info",
              ),
              dist_info_dir,
          )
  
          def substitute_vars(file_path):
              allow_to_write(file_path)
              with open(file_path, "r") as fm:
                  metadata = fm.read()
              metadata = metadata.format(
                  pkg_name=pkg_name,
                  version=ver,
              )
              with open(file_path, "w") as fm:
                  fm.write(metadata)
  
          substitute_vars(os.path.join(dist_info_dir, "METADATA"))
          substitute_vars(os.path.join(dist_info_dir, "top_level.txt"))
  
          if should_build_widget:
              data_dir = os.path.join(
                  dir_path, "{}-{}.data".format(pkg_name, ver), "data"
              )
              widget_dir = os.path.join(
                  catboost_package_dir, "catboost", "widget"
              )
              for file in ["extension.js", "index.js"]:
                  src = os.path.join(
                      widget_dir, "js", "nbextension", file
                  )
                  dst = os.path.join(
                      data_dir,
                      "share",
                      "jupyter",
                      "nbextensions",
                      "catboost-widget",
                      file,
                  )
                  if not os.path.exists(os.path.dirname(dst)):
                      os.makedirs(os.path.dirname(dst))
                  shutil.copy(src, dst)
  
              labextension_dir = os.path.join(
                  catboost_package_dir,
                  "catboost",
                  "widget",
                  "js",
                  "labextension",
              )
              for file in os.listdir(labextension_dir):
                  src = os.path.join(labextension_dir, file)
                  dst = os.path.join(
                      data_dir,
                      "share",
                      "jupyter",
                      "labextensions",
                      "catboost-widget",
                      file,
                  )
                  if not os.path.exists(os.path.dirname(dst)):
                      os.makedirs(os.path.dirname(dst))
                  if os.path.isdir(src):
                      shutil.copytree(src, dst)
                  else:
                      shutil.copy(src, dst)
  
              src = os.path.join(widget_dir, "catboost-widget.json")
              dst = os.path.join(
                  data_dir,
                  "etc",
                  "jupyter",
                  "nbconfig",
                  "notebook.d",
                  "catboost-widget.json",
              )
              if not os.path.exists(os.path.dirname(dst)):
                  os.makedirs(os.path.dirname(dst))
              shutil.copy(src, dst)
  
          # Create record
          make_record(dir_path, dist_info_dir)
  
          # Create wheel
          shutil.make_archive(wheel_name, "zip", dir_path)
          shutil.move(wheel_name + ".zip", wheel_name)
  
imports: from __future__ import print_function
  import glob
  import subprocess
  import shutil
  import os
  import stat
  import sys
  import platform
  import tempfile
  import hashlib
  from base64 import urlsafe_b64encode
  from argparse import ArgumentParser
  from enum import Enum
label_desc: Use image node_id 12 for calling a global function with example usage: make_wheel(wheel_name, pkg_name, ver, build_system, arc_root, dst_so_modules, should_build_widget) without return types