import posixpath


def extract_version(module_name):
    """
    extract the version number from the module name provided.
    :param module_name: <str> the module to find version in.
    :return: <int> version number.
    """
    # module_name_v0000.py --> module_name, _v0000.py --> _v0000
    return posixpath.splitext(module_name.split('_v')[-1])[0]