def __bool__(self):
        if not self.name:
            return False

        # Dispatch the existence_required signal before checking to see if the
        # file exists. This gives the strategy a chance to create the file.
        existence_required.send(sender=self, file=self)

        try:
            check = self.cachefile_strategy.should_verify_existence(self)
        except __HOLE__:
            # All synchronous backends should have created the file as part of
            # `existence_required` if they wanted to.
            check = getattr(self.cachefile_backend, 'is_async', False)
        return self.cachefile_backend.exists(self) if check else True
dataset/ETHPy150Open matthewwithanm/django-imagekit/imagekit/cachefiles/__init__.py/ImageCacheFile.__bool__