How to update the tabulator widget based on list filter

Can someone please help with the following fragment of code? I want to update my tabulator dataframe based on the option selection in the comp column.

import datetime as dt
import numpy as np
import pandas as pd
import panel as pn


df = pd.DataFrame({ 
    'nms': ['john', 'john', 'sara', 'tango'],
    'comp':[['abc', 'def'], ['def'], ['ctf'], ['abc', 'def', 'ctf']]    

filter_table = pn.widgets.Tabulator(df)

select1 = pn.widgets.MultiSelect(options=df.nms.unique().tolist())
filter_table.add_filter(select1, 'nms')

select2 = pn.widgets.MultiSelect(options=sorted(df.explode('comp').comp.unique().tolist()))
def contains_filter(event):    
    if select2.value==[]:
        print("returning df...")
        return df
        print(df.shape, select2.value[0])
        return df[df.comp.apply(lambda x: True if select2.value[0] in x else False)]

# Watch for changes in the 'value' parameter of select2, 'value')

# Reset button
reset_button = pn.widgets.Button(name='Reset Filters', button_type='warning')

# Define the reset function
def reset_filters(event):    
    select1.value = []
    select2.value = []
# Attach the reset function to the button

# Layout with reset button and filters
layout = pn.Row(
    pn.Column(select1, select2,reset_button),