code: def get_es_label(obj, def_obj):
      
      label_flds = LABEL_FIELDS
      if def_obj.es_defs.get('kds_esLabel'):
          label_flds = def_obj.es_defs['kds_esLabel'] + LABEL_FIELDS
      try:
          for label in label_flds:
              if def_obj.cls_defs.get(label):
                   obj['label'] = def_obj.cls_defs[label][0]
                   break
          if not obj.get('label'):
              obj['label'] = def_obj.__class__.__name__.split("_")[-1]
      except AttributeError:
          # an attribute error is caused when the class is only
          # an instance of the BaseRdfClass. We will search the rdf_type
          # property and construct a label from rdf_type value
          if def_obj.get('rdf_type'):
              obj['label'] = def_obj['rdf_type'][-1].value[-1]
          else:
              obj['label'] = "no_label"
      return obj
docs: Returns object with label for an object that goes into the elacticsearch
      'label' field
  
      args:
          obj: data object to update
          def_obj: the class instance that has defintion values