Tools for modeling H2CO absorption/emission in turbulent ISM gas