def rotate(img, angle, resample=False, expand=False, center=None):
    """

    """

    if not _is_pil_image(img):
        raise TypeError('img should be PIL Image. Got {}'.format(type(img)))

    return img.rotate(angle, resample, expand, center)