code: def _handle_exit(code, detail, output, args):
      from . import merge_impl
  
      if detail is None and code == 0:
          _handle_merge_success(output, args)
      elif isinstance(detail, merge_impl.PreviewMergeDetail):
          _handle_preview(detail.merge, args)
      elif isinstance(detail, merge_impl.ReplacementPathsDetail):
          _handle_replacement_paths(detail.paths, args)
      elif isinstance(detail, merge_impl.UnstagedPathsDetail):
          _handle_unstaged_paths(detail.paths, args)
      elif isinstance(detail, merge_impl.NothingToCopyDetail):
          _handle_nothing_to_copy(args)
      else:
          _handle_other_error(code, detail, output, args)
  
file_path: guildai/guild/commands/api_merge.py
imports: import os
  import click
  from guild import click_util
  from guild import util
  from .None import api_support
  from .None import runs_merge
label_desc: Use image node_id 3 for calling a global function with example usage: _handle_exit(code, detail, output, args) without return types