After searching the web for a bit, I found this stackoverflow-post, which exactly fits my needs. Works perfectly and I also learned something new :).
Suppose the function looks something like this:
now you want to wrap that function, you do this:
Works perfectly. Found here.