def assert_source_and_install_match(package):
    module = sys.modules[package]

    installed_version = V(module.version.version)

    setup_lines = open('../setup.py').readlines()
    for l in setup_lines:
        if l.startswith('VERSION'):
            source_version = V(l.split("'")[1])
            break

    if source_version != installed_version:
        abort("Installed version does not match source version")
Check that the source version is equal to the installed
dataset/ETHPy150Open tonysyu/mpltools/doc/tools/build_modref_templates.py/assert_source_and_install_match