parameters: (img, angle)
return_statement: return out.convert(img.mode)
docstring: rotate the image
docstring_summary: rotate the image
docstring_tokens: rotate the image
function: def rotate(img, angle):
      """ rotate the image """
      im2 = img.convert('RGBA')
      rot = im2.rotate(angle, expand=1)
      fff = Image.new('RGBA', rot.size, (255,) * 4)
      out = Image.composite(rot, fff, rot)
      return out.convert(img.mode)
function_tokens: def rotate ( img , angle ) : im2 = img . convert ( 'RGBA' ) rot = im2 . rotate ( angle , expand = 1 ) fff = Image . new ( 'RGBA' , rot . size , ( 255 , ) * 4 ) out = Image . composite ( rot , fff , rot ) return out . convert ( img . mode )