def get_deleted_services_still_used_in_volumes(meta):
    deleted_services_still_used_in_volumes = {}
    services_t = Table('services', meta, autoload=True)
    volumes_t = Table('volumes', meta, autoload=True)
    services_volumes_join = services_t.join(volumes_t, (services_t.c.uuid == volumes_t.c.service_uuid))
    columns = [services_t.c.uuid, services_t.c.deleted, volumes_t.c.id, volumes_t.c.deleted]
    deleted_services_still_used_in_volumes_q = select(columns=columns).select_from(services_volumes_join).where(and_((volumes_t.c.deleted == 0), (services_t.c.deleted == 1)))
    for (service_uuid, service_deleted, volume_id, volume_deleted) in deleted_services_still_used_in_volumes_q.execute():
        deleted_services_still_used_in_volumes[service_uuid] = volume_id
    return deleted_services_still_used_in_volumes
def get_deleted_services_still_used_in_volumes(meta):
    deleted_services_still_used_in_volumes = {}
    services_t = Table('services', meta, autoload=True)
    volumes_t = Table('volumes', meta, autoload=True)
    services_volumes_join = services_t.join(volumes_t, (services_t.c.uuid == volumes_t.c.service_uuid))
    columns = [services_t.c.uuid, services_t.c.deleted, volumes_t.c.id, volumes_t.c.deleted]
    deleted_services_still_used_in_volumes_q = select(columns=columns).select_from(services_volumes_join).where(and_((volumes_t.c.deleted == 0), (services_t.c.deleted == 1)))
    for (service_uuid, service_deleted, volume_id, volume_deleted) in deleted_services_still_used_in_volumes_q.execute():
        deleted_services_still_used_in_volumes[service_uuid] = volume_id
    return deleted_services_still_used_in_volumes