def METHOD_NAME(nota, prefix1, prefix2):
	'''Takes a note in zim format and returns a note in trac format
	'''
	#duplicate all line breaks
	nota = nota.replace('\n', '\n\n')
	# Headings
	mm = cabecera.search(nota)
	lista = []
	lastIndex = 0
	while mm:
		lista.append(nota[lastIndex:mm.start()])
		gg = mm.groups()
		iguales = len(gg[0])
		lista.append("=" * (7 - iguales) + gg[1] + "=" * (7 - iguales))
		lastIndex = mm.end()
		mm = cabecera.search(nota, lastIndex)
	lista.append(nota[lastIndex:])
	nota = ''.join(lista)
	#inlineVerbatim
	nota = inlineVerbatim.sub("{{{\\1}}}", nota)
	#multiline verbatim
	#TODO
	#bold
	nota = negrita.sub("'''\\1'''", nota)
	#italic
	nota = italic.sub("''\\1''", nota)
	#bracketedURL
	nota = bracketedURL.sub("[\\1 \\2]", nota)
	#~ #simple links
	#~ nota=simpleLink.sub("[wiki:\\1]",nota)
	#~ #named links
	#~ nota=namedLink.sub("[wiki:\\1 \\2]",nota)
	#simple relative links
	mm = simpleRelLink.search(nota)
	lista = []
	lastIndex = 0
	while mm:
		lista.append(nota[lastIndex:mm.start()])
		gg0 = mm.groups()[0]
		lista.append("[wiki:" + prefix1 + prefix2 + flatten(gg0) + " " + gg0 + "]")
		lastIndex = mm.end()
		mm = simpleRelLink.search(nota, lastIndex)
	lista.append(nota[lastIndex:])
	nota = ''.join(lista)
	mm = simpleAbsLink.search(nota)
	lista = []
	lastIndex = 0
	while mm:
		lista.append(nota[lastIndex:mm.start()])
		gg0 = mm.groups()[0]
		lista.append("[wiki:" + prefix1 + flatten(gg0) + " " + gg0 + "]")
		lastIndex = mm.end()
		mm = simpleAbsLink.search(nota, lastIndex)
	lista.append(nota[lastIndex:])
	nota = ''.join(lista)
	#named relativelinks
	mm = namedRelLink.search(nota)
	lista = []
	lastIndex = 0
	while mm:
		lista.append(nota[lastIndex:mm.start()])
		gg = mm.groups()
		lista.append("[wiki:" + prefix1 + prefix2 + flatten(gg[0]) + " " + gg[1] + "]")
		lastIndex = mm.end()
		mm = namedRelLink.search(nota, lastIndex)
	lista.append(nota[lastIndex:])
	nota = ''.join(lista)
	#named absolute links
	mm = namedAbsLink.search(nota)
	lista = []
	lastIndex = 0
	while mm:
		lista.append(nota[lastIndex:mm.start()])
		gg = mm.groups()
		lista.append("[wiki:" + prefix1 + flatten(gg[0]) + " " + gg[1] + "]")
		lastIndex = mm.end()
		mm = namedAbsLink.search(nota, lastIndex)
	lista.append(nota[lastIndex:])
	nota = ''.join(lista)
	#lists
	nota = nota.replace('\n* ', '\n * ')
	#images
	nota = images.sub("\\1[[Image(\\2)]]", nota)
	return nota