code: def get_version():
      
      VERSION_FILE = os.path.join(module_name, 'version.py')
      txt = open(VERSION_FILE).read()
      mo = re.search(r'^__version__ = [\'"]([^\'"]*)[\'"]', txt, re.M)
      if mo:
          version = mo.group(1)
          bs_version = os.environ.get('MODULEVER', '0.0')
          assert bs_version == "0.0" or bs_version == version, \
              "Version {} specified by the build system doesn't match {} in " \
              "version.py".format(bs_version, version)
          return version
      else:
          raise RuntimeError('Unable to find version string in {0}.'
                             .format(VERSION_FILE))
docs: Extracts the version number from the version.py file.