code: def get_version_string(version):
      
      version_len = len(version)
      if version_len == 3:
          version_string = '%d.%d.%d' % version
      elif version_len == 4:
          version_string = '%d.%d.%d-%s' % version
      else:
          raise Exception(
              'Version tuple is non-semver-compliant {} length!'.format(version_len)
          )
      return version_string
docs: Translate a version tuple into a string.
  
      Specify the __version__ as a tuple for more precise comparisons, and
      translate it to __version_string__ for when that's needed.
  
      This function exists primarily for easier unit testing.
  
      Args:
        version (Tuple[int, int, int, str]): three ints and an optional string.
  
      Returns:
        version_string (str): the tuple translated into a string per semver.org