docs: def create_package(ctx, opts, owner, repo, package_type, skip_errors, **kwargs):
      """Create a new package via the API."""
      click.echo(
          "Creating a new %(package_type)s package ... "
          % {"package_type": click.style(package_type, bold=True)},
          nl=False,
      )
  
      context_msg = "Failed to create package!"
      with handle_api_exceptions(
          ctx, opts=opts, context_msg=context_msg, reraise_on_error=skip_errors
      ):
          with maybe_spinner(opts):
              slug_perm, slug = api_create_package(
                  package_format=package_type, owner=owner, repo=repo, **kwargs
              )
  
      click.secho("OK", fg="green")
  
      click.echo(
          "Created: %(owner)s/%(repo)s/%(slug)s (%(slug_perm)s)"
          % {
              "owner": click.style(owner, fg="magenta"),
              "repo": click.style(repo, fg="magenta"),
              "slug": click.style(slug, fg="green"),
              "slug_perm": click.style(slug_perm, bold=True),
          }
      )
  
      return slug_perm, slug