def image_get(context, image_id, session=None, force_show_deleted=False):
    session = session or get_session()

    try:
        query = session.query(models.Image).\
                        options(joinedload(models.Image.properties)).\
                        options(joinedload(models.Image.members)).\
                        filter_by(id=image_id)

        # filter out deleted images if context disallows it
        if not force_show_deleted and not can_show_deleted(context):
            query = query.filter_by(deleted=False)

        image = query.one()

    except exc.NoResultFound:
        raise exception.NotFound("No image found with ID %s" % image_id)

    # Make sure they can look at it
    if not context.is_image_visible(image):
        raise exception.NotAuthorized("Image not visible to you")

    return image
Set the value of the given index.
dataset/ETHPy150Open rcbops/glance-buildpackage/glance/registry/db/api.py/image_get--crossover with--dataset/ETHPy150Open coleifer/walrus/walrus/containers.py/List.__setitem__