@staticmethod
    def imageEqual(image1, image2):
        """
        Return a bool signifying whether or not `image1` and `image2`
        are identical
        """
        h1 = image1.histogram()
        h2 = image2.histogram()
        rms = math.sqrt(
            reduce(
                operator.add,
                map(lambda a, b: (a - b) ** 2, h1, h2)
            ) // len(h1)
        )
        return rms == 0.0
dataset/ETHPy150Open WGBH/django-versatileimagefield/tests/tests.py/VersatileImageFieldTestCase.imageEqual/original