def maybe_get_fig_ax(*args, **kwargs):
    if 'ax' in kwargs:
        ax = kwargs.pop('ax')
        if 'fig' in kwargs:
            fig = kwargs.pop('fig')
        else:
            fig = plt.gcf()
    elif len(args) == 0:
        fig = plt.gcf()
        ax = plt.gca()
    elif isinstance(args[0], mpl.figure.Figure) and \
            isinstance(args[1], mpl.axes.Axes):
        fig = args[0]
        ax = args[1]
        args = args[2:]
    else:
        fig, ax = plt.subplots(1)
    return fig, ax, args, dict(kwargs)
Verifies main execution path of starting scan over several entities.
dataset/ETHPy150Open olgabot/prettyplotlib/prettyplotlib/utils.py/maybe_get_fig_ax--crossover with--dataset/ETHPy150Open GoogleCloudPlatform/appengine-mapreduce/python/test/mapreduce/handlers_test.py/StartJobHandlerTest.testOtherApp