<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def fig_to_geojson(fig=None, **kwargs):
 """ Returns a figure's GeoJSON representation as a dictionary All arguments passed to fig_to_html() Returns ------- GeoJSON dictionary """

    if fig is None:
        fig = plt.gcf()
    renderer = LeafletRenderer(**kwargs)
    exporter = Exporter(renderer)
    exporter.run(fig)

    return renderer.geojson()