def autocrop(im, **kwargs):
    bw = im.convert('1')
    bw = bw.filter(ImageFilter.MedianFilter)
    # White background.
    bg = Image.new('1', im.size, 255)
    diff = ImageChops.difference(bw, bg)
    bbox = diff.getbbox()
    if bbox:
        im = im.crop(bbox)
    return im
x.__repr__() <==> repr(x)
dataset/ETHPy150Open hcarvalhoalves/django-rest-thumbnails/restthumbnails/processors.py/autocrop--crossover with--dataset/ETHPy150Open circuits/circuits/circuits/core/values.py/Value.__repr__