<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def maybe_get_fig_ax(*args, **kwargs):
 """ It used to be that the first argument of prettyplotlib had to be the 'ax' object, but that's not the case anymore. This is specially made for pcolormesh. @param args: @type args: @param kwargs: @type kwargs: @return: @rtype: """

    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)