


"""simple docstring"""


import shutil
import tempfile
import unittest

from transformers import (
    SPIECE_UNDERLINE,
    AddedToken,
    BatchEncoding,
    NllbTokenizer,
    NllbTokenizerFast,
    is_torch_available,
)
from transformers.testing_utils import (
    get_tests_dir,
    nested_simplify,
    require_sentencepiece,
    require_tokenizers,
    require_torch,
)

from ...test_tokenization_common import TokenizerTesterMixin


a_       							=    get_tests_dir("fixtures/test_sentencepiece.model")


if is_torch_available():
	from transformers.models.mam_aaa.modeling_mam_aaa import shift_tokens_right

a_       							=    25_60_47
a_       							=    25_61_45
@require_sentencepiece
@require_tokenizers
class snake_case      (  __lowercase     ,				unittest.TestCase):
		__UpperCamelCase           =			NllbTokenizer
		__UpperCamelCase           =			NllbTokenizerFast
		__UpperCamelCase           =			True
		__UpperCamelCase           =			True
		__UpperCamelCase           =			{}







		def  a_ (					self      :       Any		)       ->						List[str]:





						'''simple docstring'''







						super().setUp()

						# We have a SentencePiece fixture for testing
						_A					  =			NllbTokenizer(__A    ,   keep_accents=__A		)
						tokenizer.save_pretrained(self.tmpdirname		)







		def  a_ (					self      :       Any		)       ->						Optional[int]:





						'''simple docstring'''







						_A					  =			NllbTokenizer(__A    ,   keep_accents=__A		)

						_A					  =			tokenizer.tokenize("This is a test"		)
						self.assertListEqual(__A    ,   ["▁This", "▁is", "▁a", "▁t", "est"]		)

						self.assertListEqual(
						    tokenizer.convert_tokens_to_ids(__A		)    ,   [value + tokenizer.fairseq_offset for value in [2_85, 46, 10, 1_70, 3_82]]    ,   )

						_A					  =			tokenizer.tokenize("I was born in 92000, and this is falsé."		)
						self.assertListEqual(
						    __A    ,   [
						        SPIECE_UNDERLINE + "I",
						        SPIECE_UNDERLINE + "was",
						        SPIECE_UNDERLINE + "b",
						        "or",
						        "n",
						        SPIECE_UNDERLINE + "in",
						        SPIECE_UNDERLINE + "",
						        "9",
						        "2",
						        "0",
						        "0",
						        "0",
						        ",",
						        SPIECE_UNDERLINE + "and",
						        SPIECE_UNDERLINE + "this",
						        SPIECE_UNDERLINE + "is",
						        SPIECE_UNDERLINE + "f",
						        "al",
						        "s",
						        "é",
						        ".",
						    ]    ,   )
						_A					  =			tokenizer.convert_tokens_to_ids(__A		)
						self.assertListEqual(
						    __A    ,   [
						        value + tokenizer.fairseq_offset
						        for value in [8, 21, 84, 55, 24, 19, 7, 2, 6_02, 3_47, 3_47, 3_47, 3, 12, 66, 46, 72, 80, 6, 2, 4]
						    ]    ,   )

						_A					  =			tokenizer.convert_ids_to_tokens(__A		)
						self.assertListEqual(
						    __A    ,   [
						        SPIECE_UNDERLINE + "I",
						        SPIECE_UNDERLINE + "was",
						        SPIECE_UNDERLINE + "b",
						        "or",
						        "n",
						        SPIECE_UNDERLINE + "in",
						        SPIECE_UNDERLINE + "",
						        "<unk>",
						        "2",
						        "0",
						        "0",
						        "0",
						        ",",
						        SPIECE_UNDERLINE + "and",
						        SPIECE_UNDERLINE + "this",
						        SPIECE_UNDERLINE + "is",
						        SPIECE_UNDERLINE + "f",
						        "al",
						        "s",
						        "<unk>",
						        ".",
						    ]    ,   )







		def  a_ (					self      :       Optional[int]		)       ->						str:





						'''simple docstring'''







						_A					  =			(self.rust_tokenizer_class, "hf-internal-testing/tiny-random-nllb", {})
						for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
										with self.subTest(F"""{tokenizer.__class__.__name__} ({pretrained_name})"""		):
														_A					  =			self.rust_tokenizer_class.from_pretrained(__A    ,   **__A		)
														_A					  =			self.tokenizer_class.from_pretrained(__A    ,   **__A		)

														_A					  =			tempfile.mkdtemp()

														_A					  =			tokenizer_r.save_pretrained(__A		)
														_A					  =			tokenizer_p.save_pretrained(__A		)

														# Checks it save with the same files + the tokenizer.json file for the fast one
														self.assertTrue(any("tokenizer.json" in f for f in tokenizer_r_files		)		)
														_A					  =			tuple(f for f in tokenizer_r_files if "tokenizer.json" not in f		)
														self.assertSequenceEqual(__A    ,   __A		)

														# Checks everything loads correctly in the same way
														_A					  =			tokenizer_r.from_pretrained(__A		)
														_A					  =			tokenizer_p.from_pretrained(__A		)

														# Check special tokens are set accordingly on Rust and Python
														for key in tokenizer_pp.special_tokens_map:
																		self.assertTrue(hasattr(__A    ,   __A		)		)

														shutil.rmtree(__A		)

														# Save tokenizer rust, legacy_format=True
														_A					  =			tempfile.mkdtemp()

														_A					  =			tokenizer_r.save_pretrained(__A    ,   legacy_format=__A		)
														_A					  =			tokenizer_p.save_pretrained(__A		)

														# Checks it save with the same files
														self.assertSequenceEqual(__A    ,   __A		)

														# Checks everything loads correctly in the same way
														_A					  =			tokenizer_r.from_pretrained(__A		)
														_A					  =			tokenizer_p.from_pretrained(__A		)

														# Check special tokens are set accordingly on Rust and Python
														for key in tokenizer_pp.special_tokens_map:
																		self.assertTrue(hasattr(__A    ,   __A		)		)

														shutil.rmtree(__A		)

														# Save tokenizer rust, legacy_format=False
														_A					  =			tempfile.mkdtemp()

														_A					  =			tokenizer_r.save_pretrained(__A    ,   legacy_format=__A		)
														_A					  =			tokenizer_p.save_pretrained(__A		)

														# Checks it saved the tokenizer.json file
														self.assertTrue(any("tokenizer.json" in f for f in tokenizer_r_files		)		)

														# Checks everything loads correctly in the same way
														_A					  =			tokenizer_r.from_pretrained(__A		)
														_A					  =			tokenizer_p.from_pretrained(__A		)

														# Check special tokens are set accordingly on Rust and Python
														for key in tokenizer_pp.special_tokens_map:
																		self.assertTrue(hasattr(__A    ,   __A		)		)

														shutil.rmtree(__A		)







		@require_torch
		def  a_ (					self      :       Any		)       ->						str:





						'''simple docstring'''







						if not self.test_seqaseq:
										return

						_A					  =			self.get_tokenizers()
						for tokenizer in tokenizers:
										with self.subTest(F"""{tokenizer.__class__.__name__}"""		):
														# Longer text that will definitely require truncation.
														_A					  =			[
														    " UN Chief Says There Is No Military Solution in Syria",
														    " Secretary-General Ban Ki-moon says his response to Russia\'s stepped up military support for"
														    " Syria is that \'there is no military solution\' to the nearly five-year conflict and more weapons"
														    " will only worsen the violence and misery for millions of people.",
														]
														_A					  =			[
														    "Şeful ONU declară că nu există o soluţie militară în Siria",
														    "Secretarul General Ban Ki-moon declară că răspunsul său la intensificarea sprijinului militar al"
														    " Rusiei pentru Siria este că \"nu există o soluţie militară\" la conflictul de aproape cinci ani şi"
														    " că noi arme nu vor face decât să înrăutăţească violenţele şi mizeria pentru milioane de oameni.",
														]
														try:
																		_A					  =			tokenizer.prepare_seqaseq_batch(
																		    src_texts=__A    ,   tgt_texts=__A    ,   max_length=3    ,   max_target_length=10    ,   return_tensors="pt"    ,   src_lang="eng_Latn"    ,   tgt_lang="ron_Latn"    ,   )
														except NotImplementedError:
																		return
														self.assertEqual(batch.input_ids.shape[1]    ,   3		)
														self.assertEqual(batch.labels.shape[1]    ,   10		)
														# max_target_length will default to max_length if not specified
														_A					  =			tokenizer.prepare_seqaseq_batch(
														    __A    ,   tgt_texts=__A    ,   max_length=3    ,   return_tensors="pt"		)
														self.assertEqual(batch.input_ids.shape[1]    ,   3		)
														self.assertEqual(batch.labels.shape[1]    ,   3		)

														_A					  =			tokenizer.prepare_seqaseq_batch(
														    src_texts=__A    ,   max_length=3    ,   max_target_length=10    ,   return_tensors="pt"		)
														self.assertEqual(batch_encoder_only.input_ids.shape[1]    ,   3		)
														self.assertEqual(batch_encoder_only.attention_mask.shape[1]    ,   3		)
														self.assertNotIn("decoder_input_ids"    ,   __A		)







		@unittest.skip("Unfortunately way too slow to build a BPE with SentencePiece."		)
		def  a_ (					self      :       str		)       ->						Any:





						'''simple docstring'''







						pass







		def  a_ (					self      :       str		)       ->						Optional[Any]:





						'''simple docstring'''







						for tokenizer, pretrained_name, kwargs in self.tokenizers_list:
										with self.subTest(F"""{tokenizer.__class__.__name__} ({pretrained_name})"""		):
														_A					  =			[AddedToken("<special>"    ,   lstrip=__A		)]

														_A					  =			self.rust_tokenizer_class.from_pretrained(
														    __A    ,   additional_special_tokens=__A    ,   **__A		)
														_A					  =			tokenizer_r.encode("Hey this is a <special> token"		)

														_A					  =			tokenizer_r.encode("<special>"    ,   add_special_tokens=__A		)[0]

														self.assertTrue(special_token_id in r_output		)

														if self.test_slow_tokenizer:
																		_A					  =			self.rust_tokenizer_class.from_pretrained(
																		    __A    ,   additional_special_tokens=__A    ,   **__A    ,   )
																		_A					  =			self.tokenizer_class.from_pretrained(
																		    __A    ,   additional_special_tokens=__A    ,   **__A		)

																		_A					  =			tokenizer_p.encode("Hey this is a <special> token"		)

																		_A					  =			tokenizer_cr.encode("Hey this is a <special> token"		)

																		self.assertEqual(__A    ,   __A		)
																		self.assertEqual(__A    ,   __A		)
																		self.assertTrue(special_token_id in p_output		)
																		self.assertTrue(special_token_id in cr_output		)





@require_torch
@require_sentencepiece
@require_tokenizers
class snake_case      (  unittest.TestCase):
		__UpperCamelCase           =			'facebook/nllb-200-distilled-600M'
		__UpperCamelCase           =			[
		    ' UN Chief Says There Is No Military Solution in Syria',
		    ' Secretary-General Ban Ki-moon says his response to Russia\'s stepped up military support for Syria is that "there is no military solution" to the nearly five-year conflict and more weapons will only worsen the violence and misery for millions of people.',
		]
		__UpperCamelCase           =			[
		    'Şeful ONU declară că nu există o soluţie militară în Siria',
		    'Secretarul General Ban Ki-moon declară că răspunsul său la intensificarea sprijinului militar al Rusiei'
		    ' pentru Siria este că "nu există o soluţie militară" la conflictul de aproape cinci ani şi că noi arme nu vor'
		    ' face decât să înrăutăţească violenţele şi mizeria pentru milioane de oameni.',
		]
		__UpperCamelCase           =			[
		    25_6047,
		    1_6297,
		    13_4408,
		    8165,
		    24_8066,
		    1_4734,
		    950,
		    1135,
		    10_5721,
		    3573,
		    83,
		    2_7352,
		    108,
		    4_9486,
		    2,
		]







		@classmethod
		def  a_ (					cls      :       str		)       ->						Optional[Any]:





						'''simple docstring'''







						_A					  =			NllbTokenizer.from_pretrained(
						    cls.checkpoint_name    ,   src_lang="eng_Latn"    ,   tgt_lang="ron_Latn"		)
						_A					  =			1
						return cls







		def  a_ (					self      :       Optional[Any]		)       ->						List[Any]:





						'''simple docstring'''







						self.assertEqual(self.tokenizer.fairseq_tokens_to_ids["ace_Arab"]    ,   25_60_01		)
						self.assertEqual(self.tokenizer.fairseq_tokens_to_ids["ace_Latn"]    ,   25_60_02		)
						self.assertEqual(self.tokenizer.fairseq_tokens_to_ids["fra_Latn"]    ,   25_60_57		)







		def  a_ (					self      :       List[Any]		)       ->						Any:





						'''simple docstring'''







						_A					  =			self.tokenizer.batch_encode_plus(self.src_text		).input_ids[0]
						self.assertListEqual(self.expected_src_tokens    ,   __A		)







		def  a_ (					self      :       List[Any]		)       ->						List[str]:





						'''simple docstring'''







						self.assertIn(__A    ,   self.tokenizer.all_special_ids		)
						# fmt: off
						_A					  =			[RO_CODE, 42_54, 9_80_68, 11_29_23, 3_90_72, 39_09, 7_13, 10_27_67, 26, 1_73_14, 3_56_42, 1_46_83, 3_31_18, 20_22, 6_69_87, 2, 25_60_47]
						# fmt: on

						_A					  =			self.tokenizer.decode(__A    ,   skip_special_tokens=__A		)
						_A					  =			self.tokenizer.decode(generated_ids[1:]    ,   skip_special_tokens=__A		)
						self.assertEqual(__A    ,   __A		)
						self.assertNotIn(self.tokenizer.eos_token    ,   __A		)







		def  a_ (					self      :       Union[str, Any]		)       ->						Optional[Any]:





						'''simple docstring'''







						_A					  =			["this is gunna be a long sentence " * 20]
						assert isinstance(src_text[0]    ,   __A		)
						_A					  =			10
						_A					  =			self.tokenizer(__A    ,   max_length=__A    ,   truncation=__A		).input_ids[0]
						self.assertEqual(ids[-1]    ,   2		)
						self.assertEqual(ids[0]    ,   __A		)
						self.assertEqual(len(__A		)    ,   __A		)







		def  a_ (					self      :       List[str]		)       ->						Optional[Any]:





						'''simple docstring'''







						self.assertListEqual(self.tokenizer.convert_tokens_to_ids(["<mask>", "ar_AR"]		)    ,   [25_62_03, 3]		)







		def  a_ (					self      :       Optional[int]		)       ->						Optional[int]:





						'''simple docstring'''







						_A					  =			tempfile.mkdtemp()
						_A					  =			self.tokenizer.fairseq_tokens_to_ids
						self.tokenizer.save_pretrained(__A		)
						_A					  =			NllbTokenizer.from_pretrained(__A		)
						self.assertDictEqual(new_tok.fairseq_tokens_to_ids    ,   __A		)







		@require_torch
		def  a_ (					self      :       int		)       ->						List[str]:





						'''simple docstring'''







						_A					  =			self.tokenizer(
						    self.src_text    ,   text_target=self.tgt_text    ,   padding=__A    ,   truncation=__A    ,   max_length=len(self.expected_src_tokens		)    ,   return_tensors="pt"    ,   )
						_A					  =			shift_tokens_right(
						    batch["labels"]    ,   self.tokenizer.pad_token_id    ,   self.tokenizer.lang_code_to_id["ron_Latn"]		)

						self.assertIsInstance(__A    ,   __A		)

						self.assertEqual((2, 15)    ,   batch.input_ids.shape		)
						self.assertEqual((2, 15)    ,   batch.attention_mask.shape		)
						_A					  =			batch.input_ids.tolist()[0]
						self.assertListEqual(self.expected_src_tokens    ,   __A		)
						self.assertEqual(__A    ,   batch.decoder_input_ids[0, 0]		)  # EOS
						# Test that special tokens are reset
						self.assertEqual(self.tokenizer.prefix_tokens    ,   [EN_CODE]		)
						self.assertEqual(self.tokenizer.suffix_tokens    ,   [self.tokenizer.eos_token_id]		)







		def  a_ (					self      :       List[Any]		)       ->						Union[str, Any]:





						'''simple docstring'''







						_A					  =			self.tokenizer(self.src_text    ,   padding=__A    ,   truncation=__A    ,   max_length=3    ,   return_tensors="pt"		)
						_A					  =			self.tokenizer(
						    text_target=self.tgt_text    ,   padding=__A    ,   truncation=__A    ,   max_length=10    ,   return_tensors="pt"		)
						_A					  =			targets["input_ids"]
						_A					  =			shift_tokens_right(
						    __A    ,   self.tokenizer.pad_token_id    ,   decoder_start_token_id=self.tokenizer.lang_code_to_id[self.tokenizer.tgt_lang]    ,   )

						self.assertEqual(batch.input_ids.shape[1]    ,   3		)
						self.assertEqual(batch.decoder_input_ids.shape[1]    ,   10		)







		@require_torch
		def  a_ (					self      :       str		)       ->						List[str]:





						'''simple docstring'''







						_A					  =			self.tokenizer._build_translation_inputs(
						    "A test"    ,   return_tensors="pt"    ,   src_lang="eng_Latn"    ,   tgt_lang="fra_Latn"		)

						self.assertEqual(
						    nested_simplify(__A		)    ,   {
						        # A, test, EOS, en_XX
						        "input_ids": [[25_60_47, 70, 73_56, 2]],
						        "attention_mask": [[1, 1, 1, 1]],
						        # ar_AR
						        "forced_bos_token_id": 25_60_57,
						    }    ,   )







		@require_torch
		def  a_ (					self      :       Optional[int]		)       ->						List[Any]:





						'''simple docstring'''







						_A					  =			True
						_A					  =			self.tokenizer(
						    "UN Chief says there is no military solution in Syria"    ,   src_lang="eng_Latn"    ,   tgt_lang="fra_Latn"		)
						self.assertEqual(
						    inputs.input_ids    ,   [1_62_97, 13_44_08, 2_56_53, 63_70, 2_48, 2_54, 10_39_29, 9_49_95, 1_08, 4_94_86, 2, 25_60_47]		)

						_A					  =			False
						_A					  =			self.tokenizer(
						    "UN Chief says there is no military solution in Syria"    ,   src_lang="eng_Latn"    ,   tgt_lang="fra_Latn"		)
						self.assertEqual(
						    inputs.input_ids    ,   [25_60_47, 1_62_97, 13_44_08, 2_56_53, 63_70, 2_48, 2_54, 10_39_29, 9_49_95, 1_08, 4_94_86, 2]		)



"""simple docstring"""


class snake_case      :







		def __init__(					self      :       Optional[int]    ,   a__      :       List[Any]    ,   a__      :       List[str]    ,   a__      :       Tuple		)       ->						Optional[Any]:





						'''simple docstring'''







						_A					  =			None
						_A					  =			None
						_A					  =			graph

						self._normalize_graph(a__    ,   a__		)
						_A					  =			len(a__		)
						_A					  =			None







		def  a_ (					self      :       str    ,   a__      :       List[str]    ,   a__      :       List[Any]		)       ->						Dict:





						'''simple docstring'''







						if sources is int:
										_A					  =			[sources]
						if sinks is int:
										_A					  =			[sinks]

						if len(a__		) == 0 or len(a__		) == 0:
										return

						_A					  =			sources[0]
						_A					  =			sinks[0]

						# make fake vertex if there are more
						# than one source or sink
						if len(a__		) > 1 or len(a__		) > 1:
										_A					  =			0
										for i in sources:
														max_input_flow += sum(self.graph[i]		)

										_A					  =			len(self.graph		) + 1
										for room in self.graph:
														room.insert(0    ,   0		)
										self.graph.insert(0    ,   [0] * size		)
										for i in sources:
														_A					  =			max_input_flow
										_A					  =			0

										_A					  =			len(self.graph		) + 1
										for room in self.graph:
														room.append(0		)
										self.graph.append([0] * size		)
										for i in sinks:
														_A					  =			max_input_flow
										_A					  =			size - 1







		def  a_ (					self      :       Optional[int]		)       ->						List[Any]:





						'''simple docstring'''







						if self.maximum_flow_algorithm is None:
										raise Exception("You need to set maximum flow algorithm before."		)
						if self.source_index is None or self.sink_index is None:
										return 0

						self.maximum_flow_algorithm.execute()
						return self.maximum_flow_algorithm.getMaximumFlow()







		def  a_ (					self      :       List[Any]    ,   a__      :       Optional[Any]		)       ->						str:





						'''simple docstring'''







						_A					  =			algorithm(self		)





class snake_case      :







		def __init__(					self      :       List[str]    ,   a__      :       List[str]		)       ->						Union[str, Any]:





						'''simple docstring'''







						_A					  =			flow_network
						_A					  =			flow_network.verticesCount
						_A					  =			flow_network.sourceIndex
						_A					  =			flow_network.sinkIndex
						# it's just a reference, so you shouldn't change
						# it in your algorithms, use deep copy before doing that
						_A					  =			flow_network.graph
						_A					  =			False







		def  a_ (					self      :       Optional[Any]		)       ->						List[Any]:





						'''simple docstring'''







						if not self.executed:
										self._algorithm()
										_A					  =			True







		def  a_ (					self      :       Any		)       ->						int:





						'''simple docstring'''







						pass





class snake_case      (  _UpperCamelCase):







		def __init__(					self      :       Optional[Any]    ,   a__      :       Dict		)       ->						List[str]:





						'''simple docstring'''







						super().__init__(a__		)
						# use this to save your result
						_A					  =			-1







		def  a_ (					self      :       Any		)       ->						List[str]:





						'''simple docstring'''







						if not self.executed:
										raise Exception("You should execute algorithm before using its result!"		)

						return self.maximum_flow





class snake_case      (  _UpperCamelCase):







		def __init__(					self      :       Union[str, Any]    ,   a__      :       Union[str, Any]		)       ->						Dict:





						'''simple docstring'''







						super().__init__(a__		)

						_A					  =			[[0] * self.verticies_count for i in range(self.verticies_count		)]

						_A					  =			[0] * self.verticies_count
						_A					  =			[0] * self.verticies_count







		def  a_ (					self      :       Any		)       ->						Dict:





						'''simple docstring'''







						_A					  =			self.verticies_count

						# push some substance to graph
						for nextvertex_index, bandwidth in enumerate(self.graph[self.source_index]		):
										self.preflow[self.source_index][nextvertex_index] += bandwidth
										self.preflow[nextvertex_index][self.source_index] -= bandwidth
										self.excesses[nextvertex_index] += bandwidth

						# Relabel-to-front selection rule
						_A					  =			[
						    i
						    for i in range(self.verticies_count		)
						    if i != self.source_index and i != self.sink_index
						]

						# move through list
						_A					  =			0
						while i < len(a__		):
										_A					  =			vertices_list[i]
										_A					  =			self.heights[vertex_index]
										self.process_vertex(a__		)
										if self.heights[vertex_index] > previous_height:
														# if it was relabeled, swap elements
														# and start from 0 index
														vertices_list.insert(0    ,   vertices_list.pop(a__		)		)
														_A					  =			0
										else:
														i += 1

						_A					  =			sum(self.preflow[self.source_index]		)







		def  a_ (					self      :       Dict    ,   a__      :       Any		)       ->						Optional[int]:





						'''simple docstring'''







						while self.excesses[vertex_index] > 0:
										for neighbour_index in range(self.verticies_count		):
														# if it's neighbour and current vertex is higher
														if (
														    self.graph[vertex_index][neighbour_index]
														    - self.preflow[vertex_index][neighbour_index]
														    > 0
														    and self.heights[vertex_index] > self.heights[neighbour_index]
														):
																		self.push(a__    ,   a__		)

										self.relabel(a__		)







		def  a_ (					self      :       str    ,   a__      :       Optional[int]    ,   a__      :       List[Any]		)       ->						Optional[int]:





						'''simple docstring'''







						_A					  =			min(
						    self.excesses[from_index]    ,   self.graph[from_index][to_index] - self.preflow[from_index][to_index]    ,   )
						self.preflow[from_index][to_index] += preflow_delta
						self.preflow[to_index][from_index] -= preflow_delta
						self.excesses[from_index] -= preflow_delta
						self.excesses[to_index] += preflow_delta







		def  a_ (					self      :       Any    ,   a__      :       Dict		)       ->						Any:





						'''simple docstring'''







						_A					  =			None
						for to_index in range(self.verticies_count		):
										if (
										    self.graph[vertex_index][to_index]
										    - self.preflow[vertex_index][to_index]
										    > 0
										) and (min_height is None or self.heights[to_index] < min_height):
														_A					  =			self.heights[to_index]

						if min_height is not None:
										_A					  =			min_height + 1


if __name__ == "__main__":
		a_       							=    [0]
		a_       							=    [3]
		# graph = [
		#     [0, 0, 4, 6, 0, 0],
		#     [0, 0, 5, 2, 0, 0],
		#     [0, 0, 0, 0, 4, 4],
		#     [0, 0, 0, 0, 6, 6],
		#     [0, 0, 0, 0, 0, 0],
		#     [0, 0, 0, 0, 0, 0],
		# ]
		a_       							=    [[0, 7, 0, 0], [0, 0, 6, 0], [0, 0, 0, 8], [9, 0, 0, 0]]

		# prepare our network
		a_       							=    FlowNetwork(graph, entrances, exits)
		# set algorithm
		flow_network.set_maximum_flow_algorithm(PushRelabelExecutor)
		# and calculate
		a_       							=    flow_network.find_maximum_flow()

		print(f'''maximum flow is {maximum_flow}''')