code: def find_executable(exe):
      command = shlex.split(exe)
      executable = shutil.which(command[0])
      if executable:
          command[0] = executable
          try:  # Python 3.8
              return shlex.join(command)
          except AttributeError:
              return " ".join(shlex.quote(arg) for arg in command)
  
imports: import sys
  import os
  import shlex
  import shutil
  import warnings
  import subprocess
  import unittest
  import mpi4py
label_desc: Use image node_id 1 for calling a global function with example usage: find_executable(exe) and returns: shlex, str