def adjust_saturation(img, saturation_factor):
if not _is_pil_image(img):<EOL><INDENT>raise TypeError('<STR_LIT>'.format(type(img)))<EOL><DEDENT>enhancer = ImageEnhance.Color(img)<EOL>img = enhancer.enhance(saturation_factor)<EOL>return img<EOL>
Adjust color saturation of an image.

    Args:
        img (PIL Image): PIL Image to be adjusted.
        saturation_factor (float):  How much to adjust the saturation. 0 will
            give a black and white image, 1 will give the original image while
            2 will enhance the saturation by a factor of 2.

    Returns:
        PIL Image: Saturation adjusted image.