





'''simple docstring'''

from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_sentencepiece_available,
    is_tokenizers_available,
    is_torch_available,
)


lowercase__						:      Dict	=    {
    'configuration_llama': ['LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP', 'LlamaConfig'],
}

try:
   if not is_sentencepiece_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowercase__						:      List[str]	=    ['LlamaTokenizer']

try:
   if not is_tokenizers_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowercase__						:      Optional[int]	=    ['LlamaTokenizerFast']

try:
   if not is_torch_available():
      raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
   pass
else:
   lowercase__						:      Optional[int]	=    [
       'LlamaForCausalLM',
       'LlamaModel',
       'LlamaPreTrainedModel',
       'LlamaForSequenceClassification',
   ]


if TYPE_CHECKING:
   from .configuration_llama import LLAMA_PRETRAINED_CONFIG_ARCHIVE_MAP, LlamaConfig

   try:
      if not is_sentencepiece_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_llama import LlamaTokenizer

   try:
      if not is_tokenizers_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .tokenization_llama_fast import LlamaTokenizerFast

   try:
      if not is_torch_available():
         raise OptionalDependencyNotAvailable()
   except OptionalDependencyNotAvailable:
      pass
   else:
      from .modeling_llama import LlamaForCausalLM, LlamaForSequenceClassification, LlamaModel, LlamaPreTrainedModel


else:
   import sys

   lowercase__						:      Dict	=    _LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)










'''simple docstring'''

from cva import destroyAllWindows, imread, imshow, waitKey







def  a__    (    lowercase :					str				)		->		Optional[int]:





     """simple docstring"""

     _UpperCamelCase   ,    _UpperCamelCase       =	img.shape[0], img.shape[1]

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

     return img


if __name__ == "__main__":
   # read original image
   lowercase__						:      Optional[int]	=    imread('image_data/lena.jpg', 1)

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

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



