def query_nodes(query)
      collection = connection[nodes_collection]
      collection.find(query).batch_size(999).projection(_id: 1).map { |k| k[:_id] }
    end
def query_nodes(query)
      collection = connection[nodes_collection]
      collection.find(query).batch_size(999).projection(_id: 1).map { |k| k[:_id] }
    end
get node names that fulfill given mongodb query

 @param query mongodb query