code: 
  import numpy as np
  from cva import COLOR_BGR2GRAY, cvtColor, imread, imshow, waitKey
  
  from digital_image_processing.filters.convolve import img_convolve
  
  
  
  def 		UpperCamelCase    (					_UpperCAmelCase     :      Tuple     )      -> Tuple:
  
  
  
  
  
  
  						'''simple docstring'''
  
  						_lowercase					:  Union[str, Any]    			=      np.array([[-1, 0, 1], [-2, 0, 2], [-1, 0, 1]]     )
  						_lowercase					:  Tuple    			=      np.array([[1, 2, 1], [0, 0, 0], [-1, -2, -1]]     )
  
  						_lowercase					:  Optional[int]    			=      np.abs(img_convolve(_UpperCAmelCase   , _UpperCAmelCase     )     )
  						_lowercase					:  Dict    			=      np.abs(img_convolve(_UpperCAmelCase   , _UpperCAmelCase     )     )
  						# modify the pix within [0, 255]
  						_lowercase					:  List[Any]    			=      dst_x * 255 / np.max(_UpperCAmelCase     )
  						_lowercase					:  int    			=      dst_y * 255 / np.max(_UpperCAmelCase     )
  
  						_lowercase					:  Union[str, Any]    			=      np.sqrt((np.square(_UpperCAmelCase     )) + (np.square(_UpperCAmelCase     ))     )
  						_lowercase					:  Dict    			=      dst_xy * 255 / np.max(_UpperCAmelCase     )
  						_lowercase					:  List[Any]    			=      dst_xy.astype(np.uinta     )
  
  						_lowercase					:  List[Any]    			=      np.arctana(_UpperCAmelCase   , _UpperCAmelCase     )
  						return dst, theta
  
  
  if __name__ == "__main__":
  			# read original image
  			UpperCamelCase_	:    Tuple  					=       imread("""../image_data/lena.jpg""")
  			# turn image in gray scale value
  			UpperCamelCase_	:    Dict  					=       cvtColor(img, COLOR_BGR2GRAY)
  
  			UpperCamelCase_	:    Union[str, Any]  					=       sobel_filter(gray)
  
  			# show result images
  			imshow("""sobel filter""", sobel_grad)
  			imshow("""sobel theta""", sobel_theta)
  			waitKey(0)
  
  
  
  
  
style_context: 
  from __future__ import annotations
  
  
  
  def 		UpperCamelCase    (					_UpperCAmelCase     :      list[int]   , _UpperCAmelCase     :      int     )      -> int:
  
  
  
  
  
  
  						'''simple docstring'''
  
  						_lowercase			,						_lowercase					:  Any    			=      0, len(_UpperCAmelCase     ) - 1
  						while start_ind <= end_ind:
  												if array[start_ind] == search_item:
  																		return start_ind
  												elif array[end_ind] == search_item:
  																		return end_ind
  												else:
  																		start_ind += 1
  																		end_ind -= 1
      # returns -1 if search_item is not found in array
  						return -1
  
  
  if __name__ == "__main__":
  							print(double_linear_search(list(range(100)), 40))
  
  
  
  
  