def get_cluster_ids(client):
    """
    Get cluster IDs associated with each OrientDB class name.
    """

    result = client.query('select name,clusterIds from '
                          '(select expand(classes) from metadata:schema) '
                          'limit -1')
    return {r.oRecordData['name']: r.oRecordData['clusterIds'] \
            for r in result}