def _generate_image_id(self):
        while True:
            image_id = hashlib.sha256(
                str(random.getrandbits(128)).encode('utf8')).hexdigest()

            try:
                int(image_id[0:10])
            except __HOLE__:
                # All good!
                return image_id
dataset/ETHPy150Open goldmann/docker-squash/docker_squash/v1_image.py/V1Image._generate_image_id