def get_versions(config) -> dict:
<EOL>try:<EOL><INDENT>import bel.__version__<EOL>config["<STR_LIT>"]["<STR_LIT:version>"] = bel.__version__.__version__<EOL><DEDENT>except KeyError:<EOL><INDENT>config["<STR_LIT>"] = {"<STR_LIT:version>": bel.__version__.__version__}<EOL><DEDENT>except ModuleNotFoundError:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>import tools.__version__<EOL>config["<STR_LIT>"]["<STR_LIT:version>"] = tools.__version__.__version__<EOL><DEDENT>except KeyError:<EOL><INDENT>config["<STR_LIT>"] = {"<STR_LIT:version>": tools.__version__.__version__}<EOL><DEDENT>except ModuleNotFoundError:<EOL><INDENT>pass<EOL><DEDENT>try:<EOL><INDENT>import __version__<EOL>if __version__.__name__ == "<STR_LIT>":<EOL><INDENT>config["<STR_LIT>"]["<STR_LIT:version>"] = __version__.__version__<EOL><DEDENT><DEDENT>except KeyError:<EOL><INDENT>if __version__.__name__ == "<STR_LIT>":<EOL><INDENT>config["<STR_LIT>"] = {"<STR_LIT:version>": __version__.__version__}<EOL><DEDENT><DEDENT>except ModuleNotFoundError:<EOL><INDENT>pass<EOL><DEDENT>
Get versions of bel modules and tools