<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, size=1024):
 """Returns a friendly URL version of the avatar the webhook has. If the webhook does not have a traditional avatar, their default avatar URL is returned instead. The format must be one of 'jpeg', 'jpg', or 'png'. 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 equivalent to png. size: :class:`int` The size of the image to display. Raises ------ InvalidArgument Bad image format passed to ``format`` or invalid ``size``. Returns -------- :class:`Asset` The resulting CDN asset. """

        if self.avatar is None:
            # Default is always blurple apparently
            return Asset(self._state, 'https://cdn.discordapp.com/embed/avatars/0.png')

        if not utils.valid_icon_size(size):
            raise InvalidArgument("size must be a power of 2 between 16 and 1024")

        format = format or 'png'

        if format not in ('png', 'jpg', 'jpeg'):
            raise InvalidArgument("format must be one of 'png', 'jpg', or 'jpeg'.")

        url = 'https://cdn.discordapp.com/avatars/{0.id}/{0.avatar}.{1}?size={2}'.format(self, format, size)
        return Asset(self._state, url)