code: def fork_exec(cmd, keep_fds, env=None):
      # copy the environment variables to set in the child process
      env = env or {}
      child_env = {**os.environ, **env}
      child_env["Y_PYTHON_ENTRY_POINT"] = ":main"
  
      pid = os.fork()
      if pid == 0:  # pragma: no cover
          close_fds(keep_fds)
          os.execve(sys.executable, cmd, child_env)
      else:
          return pid
  
imports: import os
  import sys
label_desc: Use image node_id 2 for calling a global function with example usage: fork_exec(cmd, keep_fds, env) and returns: pid