code: def main():
      # parse cmd arguments
      parser = getParser()
      parser.parse_args()
      args = getArguments(parser)
  
      # prepare logger
      logger = Logger.getInstance()
      if args.debug:
          logger.setLevel(logging.DEBUG)
      elif args.verbose:
          logger.setLevel(logging.INFO)
  
      # check if output image exists
      if not args.force:
          if os.path.exists(args.output):
              logger.warning(
                  "The output image {} already exists. Exiting.".format(
                      args.output
                  )
              )
              exit(-1)
  
      # constants
      # the minimal edge length of a subvolume-cube ! has to be of type int!
      minimal_edge_length = 200
      overlap = 20
  
      # load input images
      region_image_data, reference_header = load(args.region)
      markers_image_data, _ = load(args.markers)
      gradient_image_data, _ = load(args.gradient)
  
      # split marker image into fg and bg images
      fgmarkers_image_data, bgmarkers_image_data = split_marker(
          markers_image_data
      )
  
      # execute distributed graph cut
      output_volume = graphcut_split(
          graphcut_stawiaski,
          region_image_data,
          gradient_image_data,
          fgmarkers_image_data,
          bgmarkers_image_data,
          minimal_edge_length,
          overlap,
      )
  
      # save resulting mask
      save(output_volume, args.output, reference_header, args.force)
  
      logger.info("Successfully terminated.")
  
file_path: medpy/bin/medpy_graphcut_label_wsplit.py
imports: from argparse import RawTextHelpFormatter
  import argparse
  import logging
  import os
  from medpy.core import Logger
  from medpy.io import load, save
  from medpy.graphcut.wrapper import split_marker, graphcut_split, graphcut_stawiaski
label_desc: Use image node_id 1 for calling a global function with example usage: main() without return types