code: def run(exdir, logdir, args):
      success = 0
      n = 0
      if not os.path.exists(logdir):
          os.makedirs(logdir)
      for dirpath, dirnames, filenames in os.walk(exdir):
          for script in filenames:
              if script.endswith(".py") and script not in [
                  "__init__.py"
              ]:
                  n += 1
                  if script in skiped_files:
                      success += 1
                      print("\n##### " + jp(dirpath, script))
                      print(
                          strftime("%H:%M:%S", gmtime())
                          + "\tKNOWN BUG IN EXAMPLES\t"
                          + script
                      )
                  else:
                      logfn = jp(logdir, script.replace(".py", ".res"))
                      with open(logfn, "w") as logfile:
                          print("\n##### " + jp(dirpath, script))
                          execute_string = get_exe_cmd(
                              jp(dirpath, script), args
                          )
                          if execute_string:
                              os.chdir(dirpath)
                              try:
                                  proc = subprocess.Popen(
                                      execute_string
                                      if IS_WIN
                                      else [
                                          "/bin/bash",
                                          "-c",
                                          execute_string,
                                      ],
                                      stdout=subprocess.PIPE,
                                      stderr=subprocess.STDOUT,
                                      shell=False,
                                  )
                                  out = proc.communicate(
                                      timeout=execution_timeout
                                  )[0]
                              except subprocess.TimeoutExpired:
                                  proc.kill()
                                  out = proc.communicate()[0]
                                  print(
                                      "Process has timed out: "
                                      + str(execute_string)
                                  )
                              logfile.write(out.decode("ascii"))
                              if proc.returncode:
                                  print(out)
                                  print(
                                      strftime("%H:%M:%S", gmtime())
                                      + "\tFAILED"
                                      "\t" + script + "\twith errno"
                                      "\t" + str(proc.returncode)
                                  )
                              else:
                                  success += 1
                                  print(
                                      strftime("%H:%M:%S", gmtime())
                                      + "\t"
                                      "PASSED\t" + script
                                  )
                          else:
                              success += 1
                              print(
                                  strftime("%H:%M:%S", gmtime())
                                  + "\tSKIPPED\t"
                                  + script
                              )
      return success, n
  
file_path: scikit-learn-intelex/tests/run_examples.py
imports: import argparse
  import os
  import struct
  import subprocess
  import sys
  from collections import defaultdict
  from os.path import join
  from time import gmtime, strftime
  from daal4py import __has_dist__
  from daal4py.sklearn._utils import get_daal_version
label_desc: Use image node_id 6 for calling a global function with example usage: run(exdir, logdir, args) and returns: success,  n