async def METHOD_NAME(
    self, user_id: UserID, new_avatar_url: Optional[str]
) -> None:
    """
    Set the avatar of a user.
    Args:
        user_id: The user's ID.
        new_avatar_url: The new avatar URL. If this is None, the user's avatar is
            removed.
    """
    user_localpart = user_id.localpart
    await self.db_pool.simple_upsert(
        table="profiles",
        keyvalues={"user_id": user_localpart},
        values={"avatar_url": new_avatar_url, "full_user_id": user_id.to_string()},
        desc="set_profile_avatar_url",
    )