human
Can you provide a the Python code you requested given the following:
4. Create interactive plot
Select individual width and height that fits your jupyter notebook settings.
assistant
#Here is the Python code you requested.
width = 1000
height = 500

def comparison_plot(doc):
    
    # init of 5 plots for each energy level
    sources = []
    plots = []

    for level in fp.energy_levels:
        # init plots with the predfined function
        s, p = fp.init_plot(data, level, size=(width, height))
        sources.append(s)
        plots.append(p)

    # associate each plot with a tab of the interactive plot
    panels= []
    for p, level in zip(plots, fp.energy_levels):
        panels.append(Panel(child=p, title=level))

    tabs = Tabs(tabs=panels, tabs_location='below', active=2)

    # Range slider for available years
    oldest_year = min(data["year"])
    newest_year = max(data["year"])
    y_slider = RangeSlider(title="Years",
                           value=(2015,2016),
                           start=oldest_year,
                           end=newest_year,
                           step=1)

    # Select field for sources
    m_select = MultiSelect(title="Available Sources:", 
                           value=fp.global_sources,
                           options=[(s,s) for s in fp.global_sources])

    # Select button for countries
    countries = list(data["country"].unique())
    c_select = Select(title="Country", options=countries, value='FR')

    # catch all widgets 
    wid = [c_select, y_slider, m_select]
    rows = row(wid)

    # update function for `on_change` trigger
    def update(attrname, old, new):

        y = y_slider.value
        y_range = [x for x in range(y[0],y[1]+1)]
        s_selected = m_select.value
        co = c_select.value

        # run update for each plot
        for p, s, l in zip(plots, sources, fp.energy_levels):
            df = fp.filter_data_set(data, co, y_range, s_selected, l)
            source_data, x_axis = fp.prepare_data(df)
            s.data = source_data
            p.x_range.factors = x_axis

    # associate `update` function with each widget to apply updates for each change
    for w in wid:
        w.on_change('value', update)

    
    layout = column(rows,...