def METHOD_NAME(self, node):
	incdirs = []
	out_nodes = []
	protoc_flags = []
	# ensure PROTOC_FLAGS is a list; a copy is used below anyway
	self.env.PROTOC_FLAGS = self.to_list(self.env.PROTOC_FLAGS)
	if 'cxx' in self.features:
		cpp_node = node.change_ext('.pb.cc')
		hpp_node = node.change_ext('.pb.h')
		self.source.append(cpp_node)
		out_nodes.append(cpp_node)
		out_nodes.append(hpp_node)
		protoc_flags.append('--cpp_out=%s' % node.parent.get_bld().bldpath())
	if 'py' in self.features:
		py_node = node.change_ext('_pb2.py')
		self.source.append(py_node)
		out_nodes.append(py_node)
		protoc_flags.append('--python_out=%s' % node.parent.get_bld().bldpath())
	if 'javac' in self.features:
		# Make javac get also pick java code generated in build
		if not node.parent.get_bld() in self.javac_task.srcdir:
			self.javac_task.srcdir.append(node.parent.get_bld())
		protoc_flags.append('--java_out=%s' % node.parent.get_bld().bldpath())
		node.parent.get_bld().mkdir()
	tsk = self.create_task('protoc', node, out_nodes)
	tsk.env.append_value('PROTOC_FLAGS', protoc_flags)
	if 'javac' in self.features:
		self.javac_task.set_run_after(tsk)
	# Instruct protoc where to search for .proto included files.
	# For C++ standard include files dirs are used,
	# but this doesn't apply to Python for example
	for incpath in getattr(self, 'protoc_includes', []):
		incpath_node = self.path.find_node(incpath)
		if incpath_node:
			incdirs.append(incpath_node.bldpath())
		else:
			# Check if relative to top-level for extra tg dependencies
			incpath_node = self.bld.path.find_node(incpath)
			if incpath_node:
				incdirs.append(incpath_node.bldpath())
			else:
				raise Errors.WafError('protoc: include path %r does not exist' % incpath)
	tsk.env.PROTOC_INCPATHS = incdirs
	# Include paths external to the waf project (ie. shared pb repositories)
	tsk.env.PROTOC_EXTINCPATHS = getattr(self, 'protoc_extincludes', [])
	# PR2115: protoc generates output of .proto files in nested
	# directories  by canonicalizing paths. To avoid this we have to pass
	# as first include the full directory file of the .proto file
	tsk.env.prepend_value('INCPATHS', node.parent.bldpath())
	use = getattr(self, 'use', '')
	if not 'PROTOBUF' in use:
		self.use = self.to_list(use) + ['PROTOBUF']