Returns the object updated with the 'id' and 'uri' fields for the
    elasticsearch document

    args:
        obj: data object to update
        def_obj: the class instance that has defintion values

def get_es_ids(obj, def_obj):
    """
    Returns the object updated with the 'id' and 'uri' fields for the
    elasticsearch document

    args:
        obj: data object to update
        def_obj: the class instance that has defintion values
    """
    try:
        path = ""
        for base in [def_obj.__class__] + list(def_obj.__class__.__bases__):

            if hasattr(base, 'es_defs') and base.es_defs:
                path = "%s/%s/" % (base.es_defs['kds_esIndex'][0],
                                   base.es_defs['kds_esDocType'][0])
                continue
    except KeyError:
        path = ""
    if def_obj.subject.type == 'uri':
        obj['uri'] = def_obj.subject.clean_uri
        obj['id'] = path + make_es_id(obj['uri'])
    elif def_obj.subject.type == 'bnode':
        obj['id'] = path + def_obj.bnode_id()
    else:
        obj['id'] = path + make_es_id(str(obj['value']))
    return obj