
'''simple docstring'''







from cva import destroyAllWindows, imread, imshow, waitKey



def 			_a		(	_SCREAMING_SNAKE_CASE		:   List[Any]  ):
						# getting number of pixels in the image
						_SCREAMING_SNAKE_CASE,							_SCREAMING_SNAKE_CASE				= img.shape[0], img.shape[1]

						# converting each pixel's color to its negative
						for i in range(_SCREAMING_SNAKE_CASE  ):
												for j in range(_SCREAMING_SNAKE_CASE  ):
																		_SCREAMING_SNAKE_CASE				= [255, 255, 255] - img[i][j]

						return img


if __name__ == "__main__":
						# read original image
						_snake_case				:   int     =				imread("""image_data/lena.jpg""", 1)

						# convert to its negative
						_snake_case				:   Union[str, Any]     =				convert_to_negative(img)

						# show result image
						imshow("""negative of original image""", img)
						waitKey(0)
						destroyAllWindows()

'''simple docstring'''







from typing import TYPE_CHECKING

from ...utils import OptionalDependencyNotAvailable, _LazyModule, is_tf_available, is_torch_available


_snake_case				:   Optional[Any]     =				{
    """configuration_rag""": ["""RagConfig"""],
    """retrieval_rag""": ["""RagRetriever"""],
    """tokenization_rag""": ["""RagTokenizer"""],
}

try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_snake_case				:   int     =				[
						    """RagModel""",
						    """RagPreTrainedModel""",
						    """RagSequenceForGeneration""",
						    """RagTokenForGeneration""",
						]

try:
						if not is_tf_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						pass
else:
						_snake_case				:   Dict     =				[
						    """TFRagModel""",
						    """TFRagPreTrainedModel""",
						    """TFRagSequenceForGeneration""",
						    """TFRagTokenForGeneration""",
						]


if TYPE_CHECKING:
						from .configuration_rag import RagConfig
						from .retrieval_rag import RagRetriever
						from .tokenization_rag import RagTokenizer

						try:
												if not is_torch_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_rag import RagModel, RagPreTrainedModel, RagSequenceForGeneration, RagTokenForGeneration

						try:
												if not is_tf_available():
																		raise OptionalDependencyNotAvailable()
						except OptionalDependencyNotAvailable:
												pass
						else:
												from .modeling_tf_rag import (
												    TFRagModel,
												    TFRagPreTrainedModel,
												    TFRagSequenceForGeneration,
												    TFRagTokenForGeneration,
												)

else:
						import sys

						_snake_case				:   str     =				_LazyModule(__name__, globals()["""__file__"""], _import_structure, module_spec=__spec__)