code: def _process(process_tuple):
      """
      Function to process a Processor with data.
  
      The processed data is returned and if applicable also piped to the given
      output.
  
      Parameters
      ----------
      process_tuple : tuple (Processor/function, data[, output], kwargs)
  
          The tuple must contain a Processor object as the first item and the
          data to be processed as the second tuple item. If a third tuple item
          is given, it is used as an output argument. The last item is passed
          as keyword arguments to the processor's process() method.
          Instead of a Processor also a function accepting a single positional
          argument (data) or two positional arguments (data, output) can be
          given. It must behave exactly as a :class:`Processor`, i.e. return
          the processed data and optionally pipe it to the output. Keyword
          arguments are not passed to the function.
  
      Returns
      -------
      depends on the processor
          Processed data.
  
      Notes
      -----
      This must be a top-level function to be pickle-able.
  
      """
      # do not process the data, if the first item (i.e. Processor) is None
      if process_tuple[0] is None:
          return process_tuple[1]
      # call the Processor with data and kwargs
      elif isinstance(process_tuple[0], Processor):
          return process_tuple[0](
              *process_tuple[1:-1], **process_tuple[-1]
          )
      # just call whatever we got here (e.g. a function) without kwargs
      return process_tuple[0](*process_tuple[1:-1])
  
imports: from __future__ import absolute_import, division, print_function
  import argparse
  import itertools
  import multiprocessing
  import os
  import sys
  from collections.abc import MutableSequence
  import numpy
  from .utils import integer_types
label_desc: Use image node_id 1 for calling a global function with example usage: _process(process_tuple) and returns: process_tuple, process_tuple, process_tuple