code: def graphcut_subprocesses(
      graphcut_function, graphcut_arguments, processes=None
  ):
      """
      Executes multiple graph cuts in parallel.
      This can result in a significant speed-up.
  
      Parameters
      ----------
      graphcut_function : function
          The graph cut to use (e.g. `graphcut_stawiaski`).
      graphcut_arguments : tuple
          List of arguments to pass to the respective subprocesses resp. the ``graphcut_function``.
      processes : integer or None
          The number of processes to run simultaneously, if not supplied, will be the same
          as the number of processors.
  
      Returns
      -------
      segmentations : tuple of ndarray
          The graph-cut segmentation results as list of boolean arraya.
      """
      # initialize logger
      logger = Logger.getInstance()
  
      # check and eventually enhance input parameters
      if not processes:
          processes = multiprocessing.cpu_count()
      if not int == type(processes) or processes <= 0:
          raise ArgumentError(
              "The number processes can not be zero or negative."
          )
  
      logger.debug(
          "Executing graph cuts in {} subprocesses.".format(
              multiprocessing.cpu_count()
          )
      )
  
      # creates subprocess pool and execute
      pool = multiprocessing.Pool(processes)
      results = pool.map(graphcut_function, graphcut_arguments)
  
      return results
  
file_path: medpy/medpy/graphcut/wrapper.py
imports: import multiprocessing
  import itertools
  import math
  import scipy
  from .energy_label import boundary_stawiaski
  from .generate import graph_from_labels
  from ..core.exceptions import ArgumentError
  from ..core.logger import Logger
  from ..filter import relabel, relabel_map
label_desc: Use image node_id 3 for calling a global function with example usage: graphcut_subprocesses(graphcut_function, graphcut_arguments, processes) and returns: results