docs: def sync(ctx, opts, owner_repo, show_tokens, source, yes):
      """
      Sync entitlements from another repository.
  
      ***WARNING*** This will DELETE ALL of the existing entitlements in the
      repository and replace them with entitlements from the source repository.
  
      - OWNER/REPO: Specify the OWNER namespace (i.e. user or org), and the REPO
        name where you want to sync entitlements to. All separated by a slash.
  
          Example: 'your-org/your-repo'
  
      - SOURCE: Specify the SOURCE repository to copy the entitlements from.
        This *must* be in the same namespace as the destination repository.
  
          Example: 'source-repo'
  
      Full CLI example:
  
        $ cloudsmith ents sync your-org/your-repo source-repo
      """
      owner, repo = owner_repo
  
      sync_args = {
          "source": click.style(source, bold=True),
          "dest": click.style(repo, bold=True),
          "warning": click.style("*** WARNING ***", fg="yellow"),
      }
  
      # Use stderr for messages if the output is something else (e.g.  # JSON)
      use_stderr = opts.output != "pretty"
  
      if not yes:
          click.secho(
              "%(warning)s This will DELETE ALL of the existing entitlements "
              "in the %(dest)s repository and replace them with entitlements "
              "from the %(source)s repository." % sync_args,
              fg="yellow",
              err=use_stderr,
          )
          click.echo()
  
      prompt = (
          "sync entitlements from the %(source)s repository to the "
          "%(dest)s repository" % sync_args
      )
      if not utils.confirm_operation(prompt, assume_yes=yes, err=use_stderr):
          return
  
      click.secho(
          "Syncing entitlements from the %(source)s repository to the "
          "%(dest)s repository" % sync_args,
          nl=False,
          err=use_stderr,
      )
  
      context_msg = "Failed to sync the entitlements!"
      with handle_api_exceptions(ctx, opts=opts, context_msg=context_msg):
          with maybe_spinner(opts):
              entitlements_, page_info = api.sync_entitlements(
                  owner=owner, repo=repo, source=source, show_tokens=show_tokens
              )
  
      click.secho("OK", fg="green", err=use_stderr)
  
      print_entitlements(opts=opts, data=entitlements_, page_info=page_info)