How to create canister from another canister?

If it’s developed in Motoko, there’s an example at Install_code() - Easiest way to convert a .wasm module to [Nat8]? - #3 by v1ctor