<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def avatar_url_as(self, *, format=None, static_format='webp', size=1024):
 """Returns a friendly URL version of the avatar the user has. If the user does not have a traditional avatar, their default avatar URL is returned instead. The format must be one of 'webp', 'jpeg', 'jpg', 'png' or 'gif', and 'gif' is only valid for animated avatars. The size must be a power of 2 between 16 and 1024. Parameters format: Optional[:class:`str`] The format to attempt to convert the avatar to. If the format is ``None``, then it is automatically detected into either 'gif' or static_format depending on the avatar being animated or not. static_format: Optional[:class:`str`] Format to attempt to convert only non-animated avatars to. Defaults to 'webp' size: :class:`int` The size of the image to display. Raises ------ InvalidArgument Bad image format passed to ``format`` or ``static_format``, or invalid ``size``. Returns -------- :class:`Asset` The resulting CDN asset. """

        return Asset._from_avatar(self._state, self, format=format, static_format=static_format, size=size)