async def set_display_name(self, name: str):
        """
        Set the display name of the user. See also: `API reference`_

        Args:
            name: The new display name for the user.

        .. _API reference:
           https://matrix.org/docs/spec/client_server/r0.3.0.html#put-matrix-client-r0-profile-userid-displayname
        """
        await self.ensure_registered()
        content = {"displayname": name}
        await self.client.request("PUT", f"/profile/{self.mxid}/displayname", content)