python3/mock: run functinon and only mock its return code? : Using mock's capabilities within python3, I want to wrap a function and have it perform all of its normal functionality, and I simply want to mock its return value. In other words, I don't want to mock the entire function, just its return value, and I don't know how to make that happen.

    def func():
        # do something
        # do something else
        # do lots of other things
        retval = 123
        return retval
    
    with mock.patch('func') as mocked:
        mocked.return_value = 456
        # And now, I want to run the function so that when
        # it's called, "do something",  "do something else",
        # and "do lots of other things" still get performed,
        # but that 456 gets returned instead of 123.

I apologize in advance if this is documented somewhere and that I just overlooked or misunderstood those docs. If so, a pointer to the appropriate docs will be more than sufficient and much appreciated.
