code: 
  
  
  
  
  import math
  import os
  
  import cva
  import numpy as np
  
  _A							    =	255.0
  def 						lowerCAmelCase_       (	__a	,	__a )       ->			float:
  
  
  
  
  
  							"""simple docstring"""
  
  
  
  
  
  							SCREAMING_SNAKE_CASE			: str	     =np.mean((original - contrast) ** 2 )
  							if mse == 0:
  														return 100
  
  							return 20 * math.logaa(PIXEL_MAX / math.sqrt(__a ) )
  def 						lowerCAmelCase_       (	)       ->			None:
  
  
  
  
  
  							"""simple docstring"""
  
  
  
  
  
  							SCREAMING_SNAKE_CASE			: str	     =os.path.dirname(os.path.realpath(__a ) )
  							# Loading images (original image and compressed image)
  							SCREAMING_SNAKE_CASE			: Union[str, Any]	     =cva.imread(os.path.join(__a	,	'''image_data/original_image.png''' ) )
  							SCREAMING_SNAKE_CASE			: Optional[Any]	     =cva.imread(os.path.join(__a	,	'''image_data/compressed_image.png''' )	,	1 )
  
  							SCREAMING_SNAKE_CASE			: str	     =cva.imread(os.path.join(__a	,	'''image_data/PSNR-example-base.png''' ) )
  							SCREAMING_SNAKE_CASE			: Optional[int]	     =cva.imread(
  							    os.path.join(__a	,	'''image_data/PSNR-example-comp-10.jpg''' )	,	1 )
  
  							# Value expected: 29.73dB
  							print('''-- First Test --''' )
  							print(f'PSNR value is {peak_signal_to_noise_ratio(__a	,	__a )} dB' )
  
  							# # Value expected: 31.53dB (Wikipedia Example)
  							print('''\n-- Second Test --''' )
  							print(f'PSNR value is {peak_signal_to_noise_ratio(__a	,	__a )} dB' )
  
  
  if __name__ == "__main__":
  							main()
  
  
  
  
  
  
  
style_context: 
  
  
  
  
  from __future__ import annotations
  def 						lowerCAmelCase_       (	__a	,	__a	,	__a	,	__a )       ->			None:
  
  
  
  
  
  							"""simple docstring"""
  
  
  
  
  
  							SCREAMING_SNAKE_CASE     ,							SCREAMING_SNAKE_CASE			: Any	     =m - 1, 0
  							while i >= 0 and j < n:
  														if key == mat[i][j]:
  																					print(f'Key {key} found at row- {i + 1} column- {j + 1}' )
  																					return
  														if key < mat[i][j]:
  																					i -= 1
  														else:
  																					j += 1
  							print(f'Key {key} not found' )
  def 						lowerCAmelCase_       (	)       ->			None:
  
  
  
  
  
  							"""simple docstring"""
  
  
  
  
  
  							SCREAMING_SNAKE_CASE			: int	     =[[2, 5, 7], [4, 8, 13], [9, 11, 15], [12, 17, 20]]
  							SCREAMING_SNAKE_CASE			: List[str]	     =int(input('''Enter the element to be searched:''' ) )
  							print(__a )
  							search_in_a_sorted_matrix(__a	,	len(__a )	,	len(mat[0] )	,	__a )
  
  
  if __name__ == "__main__":
  							import doctest
  
  							doctest.testmod()
  							main()
  
  
  
  
  
  
  