Refactor generic parameter functions into pydic module.