human
I wrote the below code

    if (figsize is None):
        figsize = rcParams['figure.figsize']
    if (dpi is None):
        dpi = rcParams['figure.dpi']
    if (facecolor is None):
        facecolor = rcParams['figure.facecolor']
    if (edgecolor is None):
        edgecolor = rcParams['figure.edgecolor']
    if (num is None):
        allnums = [f.num for f in _pylab_helpers.Gcf.get_all_fig_managers()]
        if allnums:
            num = (max(allnums) + 1)
        else:
            num = 1
    else:
        num = int(num)
    figManager = _pylab_helpers.Gcf.get_fig_manager(num)
    if (figManager is None):
        if (get_backend().lower() == 'ps'):
            dpi = 72
        figManager = new_figure_manager(num, figsize=figsize, dpi=dpi, facecolor=facecolor, edgecolor=edgecolor, frameon=frameon, FigureClass=FigureClass, **kwargs)
        def make_active(event):
            _pylab_helpers.Gcf.set_active(figManager)
        cid = figManager.canvas.mpl_connect('button_press_event', make_active)
        figManager._cidgcf = cid
        _pylab_helpers.Gcf.set_active(figManager)
        figManager.canvas.figure.number = num
    draw_if_interactive()
    return figManager.canvas.figure

What's a good function header?
 ... Here's a good function header?
assistant
#Here's a good function header.

def figure(num=None, figsize=None, dpi=None, facecolor=None, edgecolor=None, frameon=True, FigureClass=Figure, **kwargs):