code: def __run_remote_experiment(
      experiment, remote, cache_dir="/tmp", python_binary="python"
  ):
      global total_failed
      dataset_name, model_name, method_name, metric_name = experiment
  
      # see if we have a cached version
      cache_id = __gen_cache_id(experiment)
      cache_file = os.path.join(cache_dir, cache_id + ".pickle")
      if os.path.isfile(cache_file):
          with open(cache_file, "rb") as f:
              return pickle.load(f)
  
      # this is just so we don't dump everything at once on a machine
      time.sleep(random.uniform(0, 5))
  
      # run the benchmark on the remote machine
      # start = time.time()
      cmd = (
          'CUDA_VISIBLE_DEVICES="" '
          + python_binary
          + " -c \"import shap; shap.benchmark.run_experiment(['{}', '{}', '{}', '{}'], cache_dir='{}')\" &> {}/{}.output".format(
              dataset_name,
              model_name,
              method_name,
              metric_name,
              cache_dir,
              cache_dir,
              cache_id,
          )
      )
      try:
          subprocess.check_output(["ssh", remote, cmd])
      except subprocess.CalledProcessError as e:
          print(
              "The following command failed on %s:" % remote,
              file=sys.stderr,
          )
          print(cmd, file=sys.stderr)
          total_failed += 1
          print(e)
          return
  
      # copy the results back
      subprocess.check_output(
          ["scp", remote + ":" + cache_file, cache_file]
      )
  
      if os.path.isfile(cache_file):
          with open(cache_file, "rb") as f:
              # print(cache_id.replace("__", " ") + " ...loaded from remote after %f seconds" % (time.time() - start))
              return pickle.load(f)
      else:
          raise FileNotFoundError(
              "Remote benchmark call finished but no local file was found!"
          )
  
imports: import copy
  import itertools
  import os
  import pickle
  import random
  import subprocess
  import sys
  import time
  from multiprocessing import Pool
  from ..None import __version__, datasets
  from .None import metrics, models
  from threading import Lock, Thread
label_desc: Use image node_id 8 for calling a global function with example usage: __run_remote_experiment(experiment, remote, cache_dir, python_binary) and returns: pickle, pickle