code: def set_alias(self, alias, *digests):
          # pylint: disable=too-many-locals
          
          try:
              manifest_json = self.make_manifest(*digests)
              self.set_manifest(alias, manifest_json)
              return manifest_json
          except requests.exceptions.HTTPError as ex:
              # pylint: disable=no-member
              if ex.response.status_code != requests.codes.bad_request:
                  raise
              manifest_json = self.make_unsigned_manifest(alias, *digests)
              signed_json = _sign_manifest(manifest_json)
              self._request('put', 'manifests/' + alias, data=signed_json)
              return signed_json
docs: Give a name (alias) to a set of blobs. Each blob is specified by
          the hash of its content.
  
          :param alias: Alias name
          :type alias: str
  
          :param digests: List of blob hashes (prefixed by ``sha256:``).
          :type digests: list of strings
  
          :rtype: str
          :returns: The registry manifest used to define the alias. You almost definitely won't need this.