code: def get_es_value(obj, def_obj):
      
      def get_dict_val(item):
          """
          Returns the string representation of the dict item
          """
          if isinstance(item, dict):
              return str(item.get('value'))
          return str(item)
  
      value_flds = []
      if def_obj.es_defs.get('kds_esValue'):
          value_flds = def_obj.es_defs['kds_esValue'].copy()
      else:
          # pdb.set_trace()
          value_flds = set(obj).difference(__ALL_IGN__)
          value_flds = list(value_flds)
      value_flds += __COMBINED__
      try:
          obj['value'] = [obj.get(label) for label in value_flds
                          if obj.get(label)][0]
      except IndexError:
          obj['value'] = ", ".join(["%s: %s" % (value.get('label'),
                                                value.get('value'))
                                    for prop, value in obj.items()
                                    if isinstance(value, dict) and \
                                    value.get('label')])
  
      if isinstance(obj['value'], list):
          obj['value'] = ", ".join([get_dict_val(item) for item in obj['value']])
      else:
          obj['value'] = get_dict_val(obj['value'])
      if str(obj['value']).strip().endswith("/"):
          obj['value'] = str(obj['value']).strip()[:-1].strip()
      if not obj['value']:
          obj['value'] = obj.get('uri', '')
      return obj
docs: Returns the value for an object that goes into the elacticsearch 'value'
      field
  
      args:
          obj: data object to update
          def_obj: the class instance that has defintion values