backport: Merge pull request #430 from bem/BEM-931

backport: Add ability to write level config module as a function (closes #364, BEM-931)