
import gc
import random
import tempfile
import unittest

import numpy as np
import torch
from PIL import Image
from transformers import CLIPTextConfig, CLIPTextModel, CLIPTokenizer

from diffusers import (
    AutoencoderKL,
    DDIMInverseScheduler,
    DDIMScheduler,
    DPMSolverMultistepInverseScheduler,
    DPMSolverMultistepScheduler,
    StableDiffusionDiffEditPipeline,
    UNetaDConditionModel,
)
from diffusers.utils import load_image, slow
from diffusers.utils.testing_utils import enable_full_determinism, floats_tensor, require_torch_gpu, torch_device

from ..pipeline_params import TEXT_GUIDED_IMAGE_INPAINTING_BATCH_PARAMS, TEXT_GUIDED_IMAGE_INPAINTING_PARAMS
from ..test_pipelines_common import PipelineLatentTesterMixin, PipelineTesterMixin


enable_full_determinism()

class        _UpperCamelCase				(					__UpperCAmelCase     ,       __UpperCAmelCase     ,       unittest.TestCase  ):






			'''simple docstring'''

			__UpperCamelCase      :						Dict					      = StableDiffusionDiffEditPipeline
			__UpperCamelCase      :						Tuple					      = TEXT_GUIDED_IMAGE_INPAINTING_PARAMS - {"""height""", """width""", """image"""} | {"""image_latents"""}
			__UpperCamelCase      :						str					      = TEXT_GUIDED_IMAGE_INPAINTING_BATCH_PARAMS - {"""image"""} | {"""image_latents"""}
			__UpperCamelCase      :						Optional[Any]					      = frozenset(
			    []  )  # TO-DO: update image_params once pipeline is refactored with VaeImageProcessor.preprocess
			__UpperCamelCase      :						Optional[Any]					      = frozenset([]  )

			def       lowerCAmelCase__	(       self :       List[str]      ):
							torch.manual_seed(0      )
							UpperCamelCase_:							List[Any]	=						UNetaDConditionModel(
							    block_out_channels=(32, 64)						,	layers_per_block=2						,	sample_size=32						,	in_channels=4						,	out_channels=4						,	down_block_types=("""DownBlock2D""", """CrossAttnDownBlock2D""")						,	up_block_types=("""CrossAttnUpBlock2D""", """UpBlock2D""")						,	cross_attention_dim=32						,	attention_head_dim=(2, 4)						,	use_linear_projection=lowerCAmelCase_						,	)
							UpperCamelCase_:							Tuple	=						DDIMScheduler(
							    beta_start=0.0_0085						,	beta_end=0.012						,	beta_schedule="""scaled_linear"""						,	clip_sample=lowerCAmelCase_						,	set_alpha_to_one=lowerCAmelCase_						,	)
							UpperCamelCase_:							Optional[Any]	=						DDIMInverseScheduler(
							    beta_start=0.0_0085						,	beta_end=0.012						,	beta_schedule="""scaled_linear"""						,	clip_sample=lowerCAmelCase_						,	set_alpha_to_zero=lowerCAmelCase_						,	)
							torch.manual_seed(0      )
							UpperCamelCase_:							Any	=						AutoencoderKL(
							    block_out_channels=[32, 64]						,	in_channels=3						,	out_channels=3						,	down_block_types=["""DownEncoderBlock2D""", """DownEncoderBlock2D"""]						,	up_block_types=["""UpDecoderBlock2D""", """UpDecoderBlock2D"""]						,	latent_channels=4						,	sample_size=128						,	)
							torch.manual_seed(0      )
							UpperCamelCase_:							Tuple	=						CLIPTextConfig(
							    bos_token_id=0						,	eos_token_id=2						,	hidden_size=32						,	intermediate_size=37						,	layer_norm_eps=1e-05						,	num_attention_heads=4						,	num_hidden_layers=5						,	pad_token_id=1						,	vocab_size=1000						,	hidden_act="""gelu"""						,	projection_dim=512						,	)
							UpperCamelCase_:							Optional[int]	=						CLIPTextModel(lowerCAmelCase_      )
							UpperCamelCase_:							Optional[Any]	=						CLIPTokenizer.from_pretrained("""hf-internal-testing/tiny-random-clip"""      )

							UpperCamelCase_:							Optional[Any]	=						{
							    """unet""": unet,
							    """scheduler""": scheduler,
							    """inverse_scheduler""": inverse_scheduler,
							    """vae""": vae,
							    """text_encoder""": text_encoder,
							    """tokenizer""": tokenizer,
							    """safety_checker""": None,
							    """feature_extractor""": None,
							}

							return components

			def       lowerCAmelCase__	(       self :       int						,	snake_case_ :       List[Any]						,	snake_case_ :       Dict=0      ):
							UpperCamelCase_:							List[str]	=						floats_tensor((1, 16, 16)						,	rng=random.Random(lowerCAmelCase_      )      ).to(lowerCAmelCase_      )
							UpperCamelCase_:							Tuple	=						floats_tensor((1, 2, 4, 16, 16)						,	rng=random.Random(lowerCAmelCase_      )      ).to(lowerCAmelCase_      )
							if str(lowerCAmelCase_      ).startswith("""mps"""      ):
											UpperCamelCase_:							List[Any]	=						torch.manual_seed(lowerCAmelCase_      )
							else:
											UpperCamelCase_:							Union[str, Any]	=						torch.Generator(device=lowerCAmelCase_      ).manual_seed(lowerCAmelCase_      )
							UpperCamelCase_:							Optional[Any]	=						{
							    """prompt""": """a dog and a newt""",
							    """mask_image""": mask,
							    """image_latents""": latents,
							    """generator""": generator,
							    """num_inference_steps""": 2,
							    """inpaint_strength""": 1.0,
							    """guidance_scale""": 6.0,
							    """output_type""": """numpy""",
							}

							return inputs

			def       lowerCAmelCase__	(       self :       List[str]						,	snake_case_ :       List[Any]						,	snake_case_ :       str=0      ):
							UpperCamelCase_:							str	=						floats_tensor((1, 3, 32, 32)						,	rng=random.Random(lowerCAmelCase_      )      ).to(lowerCAmelCase_      )
							UpperCamelCase_:							Optional[Any]	=						image.cpu().permute(0						,	2						,	3						,	1      )[0]
							UpperCamelCase_:							Optional[Any]	=						Image.fromarray(np.uinta(lowerCAmelCase_      )      ).convert("""RGB"""      )
							if str(lowerCAmelCase_      ).startswith("""mps"""      ):
											UpperCamelCase_:							Tuple	=						torch.manual_seed(lowerCAmelCase_      )
							else:
											UpperCamelCase_:							Dict	=						torch.Generator(device=lowerCAmelCase_      ).manual_seed(lowerCAmelCase_      )
							UpperCamelCase_:							Dict	=						{
							    """image""": image,
							    """source_prompt""": """a cat and a frog""",
							    """target_prompt""": """a dog and a newt""",
							    """generator""": generator,
							    """num_inference_steps""": 2,
							    """num_maps_per_mask""": 2,
							    """mask_encode_strength""": 1.0,
							    """guidance_scale""": 6.0,
							    """output_type""": """numpy""",
							}

							return inputs

			def       lowerCAmelCase__	(       self :       int						,	snake_case_ :       Tuple						,	snake_case_ :       Optional[Any]=0      ):
							UpperCamelCase_:							Optional[int]	=						floats_tensor((1, 3, 32, 32)						,	rng=random.Random(lowerCAmelCase_      )      ).to(lowerCAmelCase_      )
							UpperCamelCase_:							Dict	=						image.cpu().permute(0						,	2						,	3						,	1      )[0]
							UpperCamelCase_:							str	=						Image.fromarray(np.uinta(lowerCAmelCase_      )      ).convert("""RGB"""      )
							if str(lowerCAmelCase_      ).startswith("""mps"""      ):
											UpperCamelCase_:							int	=						torch.manual_seed(lowerCAmelCase_      )
							else:
											UpperCamelCase_:							Optional[Any]	=						torch.Generator(device=lowerCAmelCase_      ).manual_seed(lowerCAmelCase_      )
							UpperCamelCase_:							Dict	=						{
							    """image""": image,
							    """prompt""": """a cat and a frog""",
							    """generator""": generator,
							    """num_inference_steps""": 2,
							    """inpaint_strength""": 1.0,
							    """guidance_scale""": 6.0,
							    """decode_latents""": True,
							    """output_type""": """numpy""",
							}
							return inputs

			def       lowerCAmelCase__	(       self :       Dict      ):







							if not hasattr(self.pipeline_class						,	"""_optional_components"""      ):
											return

							UpperCamelCase_:							Optional[int]	=						self.get_dummy_components()
							UpperCamelCase_:							int	=						self.pipeline_class(**lowerCAmelCase_      )
							pipe.to(lowerCAmelCase_      )
							pipe.set_progress_bar_config(disable=lowerCAmelCase_      )

							# set all optional components to None and update pipeline config accordingly
							for optional_component in pipe._optional_components:
											setattr(lowerCAmelCase_						,	lowerCAmelCase_						,	lowerCAmelCase_      )
							pipe.register_modules(**{optional_component: None for optional_component in pipe._optional_components}      )

							UpperCamelCase_:							str	=						self.get_dummy_inputs(lowerCAmelCase_      )
							UpperCamelCase_:							str	=						pipe(**lowerCAmelCase_      )[0]

							with tempfile.TemporaryDirectory() as tmpdir:
											pipe.save_pretrained(lowerCAmelCase_      )
											UpperCamelCase_:							Dict	=						self.pipeline_class.from_pretrained(lowerCAmelCase_      )
											pipe_loaded.to(lowerCAmelCase_      )
											pipe_loaded.set_progress_bar_config(disable=lowerCAmelCase_      )

							for optional_component in pipe._optional_components:
											self.assertTrue(
											    getattr(lowerCAmelCase_						,	lowerCAmelCase_      ) is None						,	f'''`{optional_component}` did not stay set to None after loading.'''						,	)

							UpperCamelCase_:							str	=						self.get_dummy_inputs(lowerCAmelCase_      )
							UpperCamelCase_:							int	=						pipe_loaded(**lowerCAmelCase_      )[0]

							UpperCamelCase_:							Dict	=						np.abs(output - output_loaded      ).max()
							self.assertLess(lowerCAmelCase_						,	1e-4      )

			def       lowerCAmelCase__	(       self :       List[str]      ):
							UpperCamelCase_:							int	=						"""cpu"""

							UpperCamelCase_:							Any	=						self.get_dummy_components()
							UpperCamelCase_:							Any	=						self.pipeline_class(**lowerCAmelCase_      )
							pipe.to(lowerCAmelCase_      )
							pipe.set_progress_bar_config(disable=lowerCAmelCase_      )

							UpperCamelCase_:							Optional[int]	=						self.get_dummy_mask_inputs(lowerCAmelCase_      )
							UpperCamelCase_:							str	=						pipe.generate_mask(**lowerCAmelCase_      )
							UpperCamelCase_:							Union[str, Any]	=						mask[0, -3:, -3:]

							self.assertEqual(mask.shape						,	(1, 16, 16)      )
							UpperCamelCase_:							int	=						np.array([0] * 9      )
							UpperCamelCase_:							Any	=						np.abs(mask_slice.flatten() - expected_slice      ).max()
							self.assertLessEqual(lowerCAmelCase_						,	1e-3      )
							self.assertEqual(mask[0, -3, -4]						,	0      )

			def       lowerCAmelCase__	(       self :       Any      ):
							UpperCamelCase_:							str	=						"""cpu"""

							UpperCamelCase_:							Optional[Any]	=						self.get_dummy_components()
							UpperCamelCase_:							Optional[int]	=						self.pipeline_class(**lowerCAmelCase_      )
							pipe.to(lowerCAmelCase_      )
							pipe.set_progress_bar_config(disable=lowerCAmelCase_      )

							UpperCamelCase_:							List[str]	=						self.get_dummy_inversion_inputs(lowerCAmelCase_      )
							UpperCamelCase_:							List[str]	=						pipe.invert(**lowerCAmelCase_      ).images
							UpperCamelCase_:							str	=						image[0, -1, -3:, -3:]

							self.assertEqual(image.shape						,	(2, 32, 32, 3)      )
							UpperCamelCase_:							Any	=						np.array(
							    [0.5150, 0.5134, 0.5043, 0.5376, 0.4694, 0.5_1050, 0.5015, 0.4407, 0.4799]						,	)
							UpperCamelCase_:							Optional[int]	=						np.abs(image_slice.flatten() - expected_slice      ).max()
							self.assertLessEqual(lowerCAmelCase_						,	1e-3      )

			def       lowerCAmelCase__	(       self :       Optional[int]      ):
							super().test_inference_batch_single_identical(expected_max_diff=5e-3      )




			def       lowerCAmelCase__	(       self :       List[Any]      ):
							UpperCamelCase_:							int	=						"""cpu"""

							UpperCamelCase_:							Union[str, Any]	=						self.get_dummy_components()

							UpperCamelCase_:							str	=						{"""beta_start""": 0.0_0085, """beta_end""": 0.012, """beta_schedule""": """scaled_linear"""}
							UpperCamelCase_:							Any	=						DPMSolverMultistepScheduler(**lowerCAmelCase_      )
							UpperCamelCase_:							Dict	=						DPMSolverMultistepInverseScheduler(**lowerCAmelCase_      )

							UpperCamelCase_:							Union[str, Any]	=						self.pipeline_class(**lowerCAmelCase_      )
							pipe.to(lowerCAmelCase_      )
							pipe.set_progress_bar_config(disable=lowerCAmelCase_      )

							UpperCamelCase_:							str	=						self.get_dummy_inversion_inputs(lowerCAmelCase_      )
							UpperCamelCase_:							List[str]	=						pipe.invert(**lowerCAmelCase_      ).images
							UpperCamelCase_:							Any	=						image[0, -1, -3:, -3:]

							self.assertEqual(image.shape						,	(2, 32, 32, 3)      )
							UpperCamelCase_:							int	=						np.array(
							    [0.5150, 0.5134, 0.5043, 0.5376, 0.4694, 0.5_1050, 0.5015, 0.4407, 0.4799]						,	)
							UpperCamelCase_:							Dict	=						np.abs(image_slice.flatten() - expected_slice      ).max()
							self.assertLessEqual(lowerCAmelCase_						,	1e-3      )




@require_torch_gpu
@slow
class        _UpperCamelCase				(					unittest.TestCase  ):






			'''simple docstring'''

			def       lowerCAmelCase__	(       self :       Any      ):
							super().tearDown()
							gc.collect()
							torch.cuda.empty_cache()

			@classmethod
			def       lowerCAmelCase__	(       cls :       int      ):
							UpperCamelCase_:							str	=						load_image(
							    """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main/diffedit/fruit.png"""      )

							UpperCamelCase_:							str	=						raw_image.convert("""RGB"""      ).resize((768, 768)      )

							UpperCamelCase_:							Optional[Any]	=						raw_image

			def       lowerCAmelCase__	(       self :       int      ):
							UpperCamelCase_:							Optional[int]	=						torch.manual_seed(0      )

							UpperCamelCase_:							Optional[Any]	=						StableDiffusionDiffEditPipeline.from_pretrained(
							    """stabilityai/stable-diffusion-2-1"""						,	safety_checker=lowerCAmelCase_						,	torch_dtype=torch.floataa      )
							UpperCamelCase_:							str	=						DDIMScheduler.from_config(pipe.scheduler.config      )
							UpperCamelCase_:							Union[str, Any]	=						DDIMInverseScheduler.from_config(pipe.scheduler.config      )
							pipe.enable_model_cpu_offload()
							pipe.set_progress_bar_config(disable=lowerCAmelCase_      )

							UpperCamelCase_:							List[Any]	=						"""a bowl of fruit"""
							UpperCamelCase_:							int	=						"""a bowl of pears"""

							UpperCamelCase_:							Optional[int]	=						pipe.generate_mask(
							    image=self.raw_image						,	source_prompt=lowerCAmelCase_						,	target_prompt=lowerCAmelCase_						,	generator=lowerCAmelCase_						,	)

							UpperCamelCase_:							List[str]	=						pipe.invert(
							    prompt=lowerCAmelCase_						,	image=self.raw_image						,	inpaint_strength=0.7						,	generator=lowerCAmelCase_      ).latents

							UpperCamelCase_:							List[Any]	=						pipe(
							    prompt=lowerCAmelCase_						,	mask_image=lowerCAmelCase_						,	image_latents=lowerCAmelCase_						,	generator=lowerCAmelCase_						,	negative_prompt=lowerCAmelCase_						,	inpaint_strength=0.7						,	output_type="""numpy"""						,	).images[0]

							UpperCamelCase_:							int	=						(
							    np.array(
							        load_image(
							            """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"""
							            """/diffedit/pears.png"""      ).resize((768, 768)      )      )
							    / 255
							)
							assert np.abs((expected_image - image).max()      ) < 5e-1




			def       lowerCAmelCase__	(       self :       Any      ):
							UpperCamelCase_:							Any	=						torch.manual_seed(0      )

							UpperCamelCase_:							str	=						StableDiffusionDiffEditPipeline.from_pretrained(
							    """stabilityai/stable-diffusion-2-1"""						,	safety_checker=lowerCAmelCase_						,	torch_dtype=torch.floataa      )
							UpperCamelCase_:							List[Any]	=						DPMSolverMultistepScheduler.from_config(pipe.scheduler.config      )
							UpperCamelCase_:							Optional[int]	=						DPMSolverMultistepInverseScheduler.from_config(pipe.scheduler.config      )
							pipe.enable_model_cpu_offload()
							pipe.set_progress_bar_config(disable=lowerCAmelCase_      )

							UpperCamelCase_:							Dict	=						"""a bowl of fruit"""
							UpperCamelCase_:							str	=						"""a bowl of pears"""

							UpperCamelCase_:							Dict	=						pipe.generate_mask(
							    image=self.raw_image						,	source_prompt=lowerCAmelCase_						,	target_prompt=lowerCAmelCase_						,	generator=lowerCAmelCase_						,	)

							UpperCamelCase_:							Tuple	=						pipe.invert(
							    prompt=lowerCAmelCase_						,	image=self.raw_image						,	inpaint_strength=0.7						,	generator=lowerCAmelCase_						,	num_inference_steps=25						,	).latents

							UpperCamelCase_:							Any	=						pipe(
							    prompt=lowerCAmelCase_						,	mask_image=lowerCAmelCase_						,	image_latents=lowerCAmelCase_						,	generator=lowerCAmelCase_						,	negative_prompt=lowerCAmelCase_						,	inpaint_strength=0.7						,	num_inference_steps=25						,	output_type="""numpy"""						,	).images[0]

							UpperCamelCase_:							Optional[int]	=						(
							    np.array(
							        load_image(
							            """https://huggingface.co/datasets/hf-internal-testing/diffusers-images/resolve/main"""
							            """/diffedit/pears.png"""      ).resize((768, 768)      )      )
							    / 255
							)
							assert np.abs((expected_image - image).max()      ) < 5e-1








class        _UpperCamelCase				:






			'''simple docstring'''

			def __init__(       self :       List[str]						,	snake_case_ :       int						,	snake_case_ :       Optional[Any]=None						,	snake_case_ :       List[str]=None      ):
							UpperCamelCase_:							List[Any]	=						data
							UpperCamelCase_:							List[Any]	=						previous
							UpperCamelCase_:							Tuple	=						next_node

			def __str__(       self :       Dict      ):
							return f'''{self.data}'''

			def       lowerCAmelCase__	(       self :       List[str]      ):
							return self.data

			def       lowerCAmelCase__	(       self :       Any      ):
							return self.next




			def       lowerCAmelCase__	(       self :       List[str]      ):
							return self.previous




class        _UpperCamelCase				:






			'''simple docstring'''

			def __init__(       self :       Optional[Any]						,	snake_case_ :       int      ):
							UpperCamelCase_:							Union[str, Any]	=						head

			def __iter__(       self :       Union[str, Any]      ):
							return self




			def       lowerCAmelCase__	(       self :       Union[str, Any]      ):
							if not self.current:
											raise StopIteration
							else:
											UpperCamelCase_:							Dict	=						self.current.get_data()
											UpperCamelCase_:							Tuple	=						self.current.get_next()
											return value




class        _UpperCamelCase				:






			'''simple docstring'''

			def __init__(       self :       int      ):
							UpperCamelCase_:							Optional[int]	=						None  # First node in list
							UpperCamelCase_:							Dict	=						None  # Last node in list

			def __str__(       self :       Tuple      ):
							UpperCamelCase_:							int	=						self.head
							UpperCamelCase_:							Tuple	=						[]
							while current is not None:
											nodes.append(current.get_data()      )
											UpperCamelCase_:							List[str]	=						current.get_next()
							return " ".join(str(snake_case_      ) for node in nodes      )

			def __contains__(       self :       int						,	snake_case_ :       int      ):
							UpperCamelCase_:							Optional[Any]	=						self.head
							while current:
											if current.get_data() == value:
															return True
											UpperCamelCase_:							Any	=						current.get_next()
							return False

			def __iter__(       self :       Any      ):
							return LinkedListIterator(self.head      )

			def       lowerCAmelCase__	(       self :       Tuple      ):
							if self.head:
											return self.head.get_data()
							return None

			def       lowerCAmelCase__	(       self :       Optional[Any]      ):
							if self.tail:
											return self.tail.get_data()
							return None

			def       lowerCAmelCase__	(       self :       Optional[int]						,	snake_case_ :       Node      ):
							if self.head is None:
											UpperCamelCase_:							Tuple	=						node
											UpperCamelCase_:							Optional[int]	=						node
							else:
											self.insert_before_node(self.head						,	snake_case_      )

			def       lowerCAmelCase__	(       self :       Optional[Any]						,	snake_case_ :       Node      ):
							if self.head is None:
											self.set_head(snake_case_      )
							else:
											self.insert_after_node(self.tail						,	snake_case_      )

			def       lowerCAmelCase__	(       self :       List[Any]						,	snake_case_ :       int      ):
							UpperCamelCase_:							Any	=						Node(snake_case_      )
							if self.head is None:
											self.set_head(snake_case_      )
							else:
											self.set_tail(snake_case_      )

			def       lowerCAmelCase__	(       self :       Optional[Any]						,	snake_case_ :       Node						,	snake_case_ :       Node      ):
							UpperCamelCase_:							str	=						node
							UpperCamelCase_:							int	=						node.previous

							if node.get_previous() is None:
											UpperCamelCase_:							int	=						node_to_insert
							else:
											UpperCamelCase_:							Dict	=						node_to_insert

							UpperCamelCase_:							int	=						node_to_insert

			def       lowerCAmelCase__	(       self :       Dict						,	snake_case_ :       Node						,	snake_case_ :       Node      ):
							UpperCamelCase_:							Tuple	=						node
							UpperCamelCase_:							Dict	=						node.next

							if node.get_next() is None:
											UpperCamelCase_:							Union[str, Any]	=						node_to_insert
							else:
											UpperCamelCase_:							str	=						node_to_insert

							UpperCamelCase_:							int	=						node_to_insert

			def       lowerCAmelCase__	(       self :       Tuple						,	snake_case_ :       int						,	snake_case_ :       int      ):
							UpperCamelCase_:							Union[str, Any]	=						1
							UpperCamelCase_:							List[str]	=						Node(snake_case_      )
							UpperCamelCase_:							Optional[Any]	=						self.head
							while node:
											if current_position == position:
															self.insert_before_node(snake_case_						,	snake_case_      )
															return
											current_position += 1
											UpperCamelCase_:							Dict	=						node.next
							self.insert_after_node(self.tail						,	snake_case_      )

			def       lowerCAmelCase__	(       self :       int						,	snake_case_ :       int      ):
							UpperCamelCase_:							Union[str, Any]	=						self.head
							while node:
											if node.get_data() == item:
															return node
											UpperCamelCase_:							List[Any]	=						node.get_next()
							raise Exception("""Node not found"""      )

			def       lowerCAmelCase__	(       self :       List[Any]						,	snake_case_ :       List[str]      ):
							if (node := self.get_node(snake_case_      )) is not None:
											if node == self.head:
															UpperCamelCase_:							Optional[int]	=						self.head.get_next()

											if node == self.tail:
															UpperCamelCase_:							Union[str, Any]	=						self.tail.get_previous()

											self.remove_node_pointers(snake_case_      )

			@staticmethod
			def       lowerCAmelCase__	(       snake_case_ :       Node      ):
							if node.get_next():
											UpperCamelCase_:							str	=						node.previous

							if node.get_previous():
											UpperCamelCase_:							int	=						node.next

							UpperCamelCase_:							List[str]	=						None
							UpperCamelCase_:							int	=						None




			def       lowerCAmelCase__	(       self :       str      ):
							return self.head is None







def        A__					(						)  ->	None:
				pass


if __name__ == "__main__":
							import doctest

							doctest.testmod()






