def METHOD_NAME(data, period_list, include_in_gross=1):
	revenue = [
		item for item in data if item["include_in_gross"] == include_in_gross or item["is_group"] == 1
	]
	data_to_be_removed = True
	while data_to_be_removed:
		revenue, data_to_be_removed = remove_parent_with_no_child(revenue)
	adjust_account_totals(revenue, period_list)
	return copy.deepcopy(revenue)