python – How to use Decorators with parameters?

I am having a problem with the substitution of the variable ‘insurance_bode’ by the decorator when I was referring to a python tutorial. I have executed the following decorator statement:

@execute_complete_reservation(True)

def test_booking_gta_object(self):

self.test_select_gta_object()

but unfortunately, this statement does not work.

def execute_complete_reservation(test_case,insurance_bode):

def inner_function(self,*args,**kwargs):

    self.test_create_qsf_query()

    test_case(self,*args,**kwargs)

    self.test_select_room_option()

    if insurance_bode:

        self.test_accept_insurance_crosseling()

    else:

        self.test_decline_insurance_crosseling()

    self.test_configure_pax_details()

    self.test_configure_payer_details

return inner_function