docs: def matcher(graph1, graph2, confidence=0.5, output_file="matching_results.csv", class_or_prop="classes", verbose=False):
  	"""
  	takes two graphs and matches its classes based on qname, label etc..
  	@todo extend to properties and skos etc..
  	"""
  
  	printDebug("----------\nNow matching...")
  
  	f = open(output_file, 'wt')
  	counter = 0
  
  	try:
  		writer = csv.writer(f, quoting=csv.QUOTE_NONNUMERIC)
  		writer.writerow( ('name 1', 'name 2', 'uri 1', 'uri 2') )
  
  		# a) match classes
  
  		if class_or_prop == "classes":
  
  			for x in graph1.all_classes:
  				l1 = unicode(x.bestLabel(qname_allowed=True))
  
  				for y in graph2.all_classes:
  					l2 = unicode(y.bestLabel(qname_allowed=True))
  
  					if similar(l1, l2) > confidence:
  						counter += 1
  						row = [l1, l2, x.uri, y.uri]
  						writer.writerow([s.encode('utf8') if type(s) is unicode else s for s in row])
  						if verbose:
  							print("%s ==~== %s" % (l1, l2))
  
  
  		# b) match properties
  
  		elif class_or_prop == "properties":
  
  			for x in graph1.all_properties:
  				l1 = unicode(x.bestLabel(qname_allowed=True))
  
  				for y in graph2.all_properties:
  					l2 = unicode(y.bestLabel(qname_allowed=True))
  
  					if similar(l1, l2) > confidence:
  						counter += 1
  						row = [l1, l2, x.uri, y.uri]
  						writer.writerow([s.encode('utf8') if type(s) is unicode else s for s in row])
  						if verbose:
  							print("%s ==~== %s" % (l1, l2))
  
  	finally:
  		f.close()
  
  	printDebug("%d candidates found." % counter)