first implementation, half of the tests succeed
need to call duplicate() occasionally to make the tests work
mocking imported functions now works!
not patching package environment anymore
cleanup
only need to mock in one environment at a time
remove debugging artifact
reformat error message
remove caveat
update docs
use explicit function import instead of registration -- this is checked at build time
test restoring of mocked function on error