




from unittest.mock import patch

import datasets
from datasets import Dataset





def 							A__   ()    ->	List[Any]:
					__UpperCamelCase				:  Any								=			Dataset.from_dict({"""col_1""": [3, 2, 0, 1]}							)

					with patch("""tqdm.auto.tqdm"""							) as mock_tqdm:
										datasets.disable_progress_bar()
										dset.map(lambda snake_case							: {"col_2": x["col_1"] + 1}							)
										mock_tqdm.assert_not_called()

										mock_tqdm.reset_mock()

										datasets.enable_progress_bar()
										dset.map(lambda snake_case							: {"col_2": x["col_1"] + 1}							)
										mock_tqdm.assert_called()












import os





def 							A__   ()    ->	int:
					__UpperCamelCase				:  int								=			os.path.dirname(os.path.realpath(snake_case							)							)
					__UpperCamelCase				:  List[str]								=			os.path.join(snake_case		,  """triangle.txt"""							)

					with open(snake_case							) as in_file:
										__UpperCamelCase				:  Optional[Any]								=			[[int(snake_case							) for i in line.split()] for line in in_file]

					while len(snake_case							) != 1:
										__UpperCamelCase				:  Union[str, Any]								=			triangle.pop()
										__UpperCamelCase				:  List[str]								=			triangle[-1]
										for j in range(len(snake_case							) - 1							):
															curr_row[j] += max(last_row[j]		,  last_row[j + 1]							)
					return triangle[0][0]


if __name__ == "__main__":
	print(solution())






