def query_facts_exist(query, facts = [])
      result = query_facts(query, facts)
      unless facts.empty?
        result.keep_if do |_k, v|
          facts.any? { |f| !v[f].nil? }
        end
      end
      result
    end
def query_facts_exist(query, facts = [])
      result = query_facts(query, facts)
      unless facts.empty?
        result.keep_if do |_k, v|
          facts.any? { |f| !v[f].nil? }
        end
      end
      result
    end
get nodes and their facts that fulfill given mongodb query and have at least one
 value for one the given fact names

 @param query mongodb query
 @param facts [Array<String>] get these facts in the result, eg ['fqdn'], empty for all