code: def get_version():
      
      # Get location of application wide version info
      root_dir = os.path.abspath(os.path.join(os.path.dirname(__file__)))
      version_file = os.path.join(root_dir, 'safe', 'definitions', 'versions.py')
      fid = open(version_file)
      version = ''
      for line in fid.readlines():
          if line.startswith('inasafe_version'):
              version = line.strip().split(' = ')[1]
              version = version.replace('\'', '')
              break
      fid.close()
      if version:
          return version
      else:
          raise Exception('Version is not found in %s' % version_file)
docs: Obtain InaSAFE's version from version file.
  
      :returns: The current version number.
      :rtype: str