def node_properties_update(new_node_properties)
      collection = connection[node_properties_collection]
      old_names = collection.find.batch_size(999).projection(_id: 1).map { |k| k[:_id] }
      delete = old_names - new_node_properties.keys
      data = new_node_properties.map do |k, v|
        {
          replace_one:
          {
            filter: { _id: k },
            replacement: v,
            upsert: true
          }
        }
      end
      collection.bulk_write(data)
      collection.delete_many(_id: { '$in' => delete })
    end
def node_properties_update(new_node_properties)
      collection = connection[node_properties_collection]
      old_names = collection.find.batch_size(999).projection(_id: 1).map { |k| k[:_id] }
      delete = old_names - new_node_properties.keys
      data = new_node_properties.map do |k, v|
        {
          replace_one:
          {
            filter: { _id: k },
            replacement: v,
            upsert: true
          }
        }
      end
      collection.bulk_write(data)
      collection.delete_many(_id: { '$in' => delete })
    end
update node properties