Utility functions
(e.g. Determining the remote system OS)
You should ALWAYS include this module in your deployment. It contains functions that are used by other modules.
Import and return module_name.
>>> try_import("csv")
<module 'csv' from '...'>
Unlike the standard try/except approach to optional imports, inspect the stack to avoid catching ImportErrors raised from within the module. Only return None if module_name itself cannot be imported.
>>> try_import("spam.spam.spam") is None
True