code: def generate_minion_id():
      '''
      Return only first element of the hostname from all possible list.
  
      :return:
      '''
      try:
          ret = salt.utils.stringutils.to_unicode(_generate_minion_id().first())
      except TypeError:
          ret = None
      return ret or 'localhostf generate_minion_id():
      '''
      Return only first element of the hostname from all possible list.
  
      :return:
      '''
      try:
          ret = salt.utils.stringutils.to_unicode(_generate_minion_id().first())
      except TypeError:
          ret = None
      return ret or 'localhost'
docs: Return only first element of the hostname from all possible list.
  
      :return: