code: def _run_op_in_background(
      run, op, pidfile, quiet, stop_after, extra_env
  ):
      import daemonize
  
      action = lambda: _run_op(run, op, quiet, stop_after, extra_env)
      daemon = daemonize.Daemonize(
          app="guild_op", action=action, pid=pidfile, chdir=config.cwd()
      )
      # Need to log before starting daemon, otherwise output isn't
      # visible.
      if not quiet:
          log.info(
              "%s started in background as %s (pidfile %s)",
              run.opref.to_opspec(config.cwd()),
              run.id,
              pidfile,
          )
      try:
          daemon.start()
      except SystemExit:
          op_util.clear_run_pending(run)
          raise
  
imports: import logging
  import os
  import subprocess
  import time
  from guild import config
  from guild import exit_code
  from guild import log
  from guild import op_dep
  from guild import op_util
  from guild import run
  from guild import util
label_desc: Use image node_id 8 for calling a global function with example usage: _run_op_in_background(run, op, pidfile, quiet, stop_after, extra_env) without return types