def METHOD_NAME(parsetree, notebook, path):
	'''Changes parsetree in place so links can later be resolved against
	the source page
	'''
	newtree = parsetree.substitute_elements(
		(LINK, IMAGE, OBJECT),
		partial(_resolve_links_and_images, notebook, path)
	)
	newtree._set_root_attrib('notebook', notebook.interwiki)
	newtree._set_root_attrib('page', path.name)
	return newtree