def download_avatar_image(user, size):
 url = avatar_for_email(user.email, size)
 request = Request(url)
 request.timeout = 0.5
 request.add_header(u'User-Agent', USER_AGENT)
 handle = urlopen(request)
 return handle.read()

def download_avatar_image ( user , size ) : url = avatar_for_email ( user . email , size ) request = Request ( url ) request . timeout = 0.5 request . add_header ( u'User-Agent' , USER_AGENT ) handle = urlopen ( request ) return handle . read ( )
downloads avatar image from remote server .