code: def try_run_setup(*, with_binary, with_cuda):
      """Fails gracefully when various install steps don't work."""
      global _BUILD_ATTEMPTS
      _BUILD_ATTEMPTS += 1
  
      try:
          print(
              f"Attempting to build SHAP: {with_binary=}, {with_cuda=} (Attempt {_BUILD_ATTEMPTS})"
          )
          run_setup(with_binary=with_binary, with_cuda=with_cuda)
      except Exception as e:
          print("Exception occurred during setup,", str(e))
  
          if with_cuda:
              with_cuda = False
              print("WARNING: Could not compile cuda extensions.")
              print("Retrying SHAP build without cuda extension...")
          elif with_binary:
              with_binary = False
              print(
                  "WARNING: The C extension could not be compiled, sklearn tree models not supported."
              )
              print("Retrying SHAP build without binary extension...")
          else:
              print("ERROR: Failed to build!")
              raise
  
          try_run_setup(with_binary=with_binary, with_cuda=with_cuda)
  
file_path: shap/setup.py
imports: import os
  import platform
  import subprocess
  import sys
  import sysconfig
  import numpy
  from packaging.version import Version, parse
  from setuptools import Extension, setup
label_desc: Use image node_id 5 for calling a global function with example usage: try_run_setup() without return types