docs: def version_str(version):
      """Convert a version tuple or string to a string.
  
      Should be returned in the form: major.minor.release
      """
      if isinstance(version, str):
          return version
      elif isinstance(version, tuple):
          return '.'.join([str(int(x)) for x in version])
      else:
          raise ValueError("Invalid version: %s" % version)