code: def process_online(processor, infile, outfile, **kwargs):
      """
      Process a file or audio stream with the given Processor.
  
      Parameters
      ----------
      processor : :class:`Processor` instance
          Processor to be processed.
      infile : str or file handle, optional
          Input file (handle). If none is given, the stream present at the
          system's audio input is used. Additional keyword arguments can be used
          to influence the frame size and hop size.
      outfile : str or file handle
          Output file (handle).
      kwargs : dict, optional
          Keyword arguments passed to :class:`.audio.signal.Stream` if
          `in_stream` is 'None'.
  
      Notes
      -----
      Right now there is no way to determine if a processor is online-capable or
      not. Thus, calling any processor with this function may not produce the
      results expected.
  
      """
      from madmom.audio.signal import Stream, FramedSignal
  
      # set default values
      kwargs["sample_rate"] = kwargs.get("sample_rate", 44100)
      kwargs["num_channels"] = kwargs.get("num_channels", 1)
      # list all available PyAudio devices and exit afterwards
      if kwargs["list_stream_input_device"]:
          import pyaudio
  
          pa = pyaudio.PyAudio()
          for i in range(pa.get_device_count()):
              info = pa.get_device_info_by_index(i)
              print("%d: %s" % (info["index"], info["name"]))
          exit(0)
  
      # if no input file is given, create a Stream with the given arguments
      if infile is None:
          # open a stream and start if not running already
          stream = Stream(**kwargs)
          if not stream.is_running():
              stream.start()
      # use the input file
      else:
          # set parameters for opening the file
          from .audio.signal import (
              FRAME_SIZE,
              HOP_SIZE,
              FPS,
              NUM_CHANNELS,
          )
  
          frame_size = kwargs.get("frame_size", FRAME_SIZE)
          hop_size = kwargs.get("hop_size", HOP_SIZE)
          fps = kwargs.get("fps", FPS)
          num_channels = kwargs.get("num_channels", NUM_CHANNELS)
          # FIXME: overwrite the frame size with the maximum value of all used
          #        processors. This is needed if multiple frame sizes are used
          import warnings
  
          warnings.warn(
              "make sure that the `frame_size` (%d) is equal to the "
              "maximum value used by any `FramedSignalProcessor`."
              % frame_size
          )
          # Note: origin must be 'online' and num_frames 'None' to behave exactly
          #       the same as with live input
          stream = FramedSignal(
              infile,
              frame_size=frame_size,
              hop_size=hop_size,
              fps=fps,
              origin="online",
              num_frames=None,
              num_channels=num_channels,
          )
      # set arguments for online processing
      # Note: pass only certain arguments, because these will be passed to the
      #       processors at every time step (kwargs contains file handles etc.)
      process_args = {
          "reset": False
      }  # do not reset stateful processors
      # process everything frame-by-frame
      for frame in stream:
          _process((processor, frame, outfile, process_args))
  
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 4 for calling a global function with example usage: process_online(processor, infile, outfile) without return types