We have been using Mock for python for a while.
Now, we have a situation in which we want to mock a function
def foo(self, my_param): #do someth
Side effect takes a function (which can also be a lambda function), so for simple cases you may use:
m = MagicMock(side_effect=(lambda x: x+1))