make some simple code generate function depend on other package