def remove_image(image):
    client = _get_client()
    status = base_status.copy()
    # will raise an error if no deletion
    try:
        infos = _get_image_infos(image)
        if infos:
            status['id'] = infos['Id']
            try:
                client.remove_image(infos['Id'])
            except Exception:
                _invalid(status,
                         id_=image,
                         out=traceback.format_exc(),
                         comment='Image could not be deleted')
            try:
                infos = _get_image_infos(image)
                _invalid(status,
                         comment=(
                             'Image marked to be deleted but not deleted yet'))
            except Exception:
                _valid(status, id_=image, comment='Image deleted')
        else:
            _invalid(status)
    except Exception:
        _invalid(status,
                 out=traceback.format_exc(),
                 comment='Image does not exist: {0}'.format(image))
    return status
Find all-pairs shortest path lengths using Floyd's algorithm.
dataset/ETHPy150Open saltstack/salt/salt/modules/dockerio.py/remove_image--crossover with--dataset/ETHPy150Open gkno/gkno_launcher/src/networkx/algorithms/shortest_paths/dense.py/floyd_warshall