def resize_image(img, new_width, new_height):
    """Resize image to a ``new_width`` and ``new_height``.
    
    Args:
        img (PIL image): An image.
        new_width (int): New width.
        new_height (int): New height.
    
    Returns:
        PIL image: A resized image.
    
    Examples:
        >>> img = Image.open('share/Lenna.png')
        >>> img_resized = resize_image(img, 256, 256)
        >>> img_resized.size
        (256, 256)
    """
    img_new = img.resize((new_width, new_height))
    return img_new