<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def display(fig=None, closefig=True, **kwargs):
 """ Convert a Matplotlib Figure to a Leaflet map. Embed in IPython notebook. Parameters fig : figure, default gcf() Figure used to convert to map closefig : boolean, default True Close the current Figure """

    from IPython.display import HTML
    if fig is None:
        fig = plt.gcf()
    if closefig:
        plt.close(fig)

    html = fig_to_html(fig, **kwargs)

    # We embed everything in an iframe.
    iframe_html = '<iframe src="data:text/html;base64,{html}" width="{width}" height="{height}"></iframe>'\
    .format(html = base64.b64encode(html.encode('utf8')).decode('utf8'),
            width = '100%',
            height= int(60.*fig.get_figheight()),
           )
    return HTML(iframe_html)