<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plot_number_observer(*args, **kwargs):
 """ Generate a plot from NumberObservers and show it. See plot_number_observer_with_matplotlib and _with_nya for details. Parameters obs : NumberObserver (e.g. FixedIntervalNumberObserver) interactive : bool, default False Choose a visualizer. If False, show the plot with matplotlib. If True (only available on IPython Notebook), show it with nyaplot. Examples -------- """

    interactive = kwargs.pop('interactive', False)
    if interactive:
        plot_number_observer_with_nya(*args, **kwargs)
    # elif __on_ipython_notebook():
    #     kwargs['to_png'] = True
    #     plot_number_observer_with_nya(*args, **kwargs)
    else:
        if kwargs.pop('to_png', None) is not None:
            #XXX: Remove an option available only on nyaplot for the consistency
            import warnings
            warnings.warn(
                "An option 'to_png' is not available with matplotlib. Just ignored.")
        plot_number_observer_with_matplotlib(*args, **kwargs)