code: def set_keyring(keyring):
      
      global _keyring_backend
      if not isinstance(keyring, backend.KeyringBackend):
          raise TypeError("The keyring must be a subclass of KeyringBackend")
      _keyring_backend = keyring
docs: Set current keyring backend.