code: def main(ctx, args):
      """Provides merge support.
  
      Use '--preview' to generate JSON output describing a merge.
  
      This command does not prompt for user input. If '--yes' is not
      specified, the command fails with an error.
      """
      from guild.util import StderrCapture
      from .merge_impl import main_with_system_exit_detail as merge_main
      from .merge_impl import SystemExitWithDetail
  
      _check_merge_without_yes(args, ctx)
  
      with StderrCapture() as out:
          try:
              merge_main(args, ctx)
          except SystemExitWithDetail as e:
              _handle_exit(e.code, e.detail, out.get_value(), args)
          except SystemExit as e:
              # Calling `main_with_system_exit_detail` should not raise
              # SystemExit - any system exit related exception should be
              # wrapped in `SystemExitWithDetail`. See class docs for
              # `guild.commands.merge_impl.SystemExitWithDetail` for
              # more information.
              assert False, e
          else:
              _handle_exit(0, None, out.get_value(), 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 1 for calling a global function with example usage: main(ctx, args) without return types