def METHOD_NAME(input_file, output_file=None, format=None):
    """Crop to non-zero area of the image
    :param input_file: Name of the file to manipulate
    :param output_file: filename for the new file (same as input by default)
    :param format: format to be used new file (if different from extension)
    """
    if PIL is None:
        raise RuntimeError(_("Install PIL or Pillow to use this function"))
    if not output_file:
        output_file = input_file
    img = Image.open(input_file)
    box = img.getbbox()
    cropped_image = img.crop(box)
    cropped_image.save(output_file, format)