docs: def version_add(package, version, pkghash, force=False):
      """
      Add a new version for a given package hash.
  
      Version format needs to follow PEP 440.
      Versions are permanent - once created, they cannot be modified or deleted.
      """
      team, owner, pkg = parse_package(package)
      session = _get_session(team)
  
      try:
          Version(version)
      except ValueError:
          url = "https://www.python.org/dev/peps/pep-0440/#examples-of-compliant-version-schemes"
          raise CommandException(
              "Invalid version format; see %s" % url
          )
  
      if not force:
          answer = input("Versions cannot be modified or deleted; are you sure? (y/n) ")
          if answer.lower() != 'y':
              return
  
      session.put(
          "{url}/api/version/{owner}/{pkg}/{version}".format(
              url=get_registry_url(team),
              owner=owner,
              pkg=pkg,
              version=version
          ),
          data=json.dumps(dict(
              hash=_match_hash(package, pkghash)
          ))
      )