import ast


def nodeLines(node):
	"""
	Get the line number range of a node

	Args:
		node: an ast node

	Returns:
		(start line #, end line # + 1)
	"""
	
	min_lineno = node.lineno
	max_lineno = node.lineno
	for node in ast.walk(node):
		if hasattr(node, "lineno"):
			min_lineno = min(min_lineno, node.lineno)
			max_lineno = max(max_lineno, node.lineno)
	return [min_lineno, max_lineno + 1]