def get_image_parent(image_id):
    if images_cache in image_id:
        return images_cache[image_id]
    image_json = store.image_json_path(image_id)
    parent_id = None
    try:
        # Note(dmp): unicode patch
        info = store.get_json(image_json)
        if info['id'] != image_id:
            warning('image_id != json image_id for image_id: ' + image_id)
        parent_id = info.get('parent')
    except exceptions.FileNotFoundError:
        warning('graph is broken for image_id: {0}'.format(image_id))
    images_cache[image_id] = parent_id
    return parent_id
dataset/ETHPy150Open docker/docker-registry/scripts/create_ancestry.py/get_image_parent/swapped operands of `in`