code: def _resolve_host(fqdn, localname):
          
          if fqdn:
              return socket.getfqdn()
          elif localname is not None:
              return localname
          return socket.gethostname()
docs: Resolve the ``host`` GELF field
  
          :param fqdn: Boolean indicating whether to use :meth:`socket.getfqdn`
              to obtain the ``host`` GELF field.
          :type fqdn: bool
  
          :param localname: Use specified hostname as the ``host`` GELF field.
          :type localname: str or None
  
          :return: String value representing the ``host`` GELF field.
          :rtype: str