update description of implementation detail
refactor: extract mock constructor
inline reassign_function
rename C_reassign_function to reassign_function
inline duplicate function, avoid using it in tests
rename C_duplicate to duplicate_