I want to implenent a decorator accepting a probability as an argument with the following syntax:
@trigger_randomly(0.5) def func():
using only n