def imview_async(*args, **kwargs):
    """
    A version of `imview` that forks a separate process and
    immediately shows the image.

    Parameters
    ----------
    window_title : str
        TODO: writeme with decorators to inherit the other imviews'
        docstrings

    Notes
    -----
    Supports the `window_title` keyword argument to cope with
    the title always being 'Figure 1'.

    Returns the `multiprocessing.Process` handle.
    """
    if 'figure' in kwargs:
        raise ValueError("passing a figure argument not supported")

    def fork_image_viewer():
        f = plt.figure()
        kwargs['figure'] = f
        imview(*args, **kwargs)
        if 'window_title' in kwargs:
            f.set_window_title(kwargs['window_title'])
        plt.show()

    p = Process(None, fork_image_viewer)
    p.start()
    return p
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/utils/image.py/imview_async/original