code: 
  '''simple docstring'''
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       list[list[int]]  ,      _lowerCamelCase						:       list[list[int]]		)    ->						Tuple:
    _lowerCAmelCase       :  Optional[int]   				=					[]
    _lowerCAmelCase       :  List[Any]   				=					len(lowercase__		)
    for i in range(lowercase__		):
      _lowerCAmelCase       :  Any   				=					[]
      for j in range(lowercase__		):
        _lowerCAmelCase       :  Dict   				=					0
        for k in range(lowercase__		):
          _lowerCAmelCase       :  Dict   				=					val + matrix_a[i][k] * matrix_b[k][j]
        list_a.append(lowercase__		)
      matrix_c.append(lowercase__		)
    return matrix_c
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       int		)    ->						List[str]:
    return [[int(row == column		) for column in range(lowercase__		)] for row in range(lowercase__		)]
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       int		)    ->						List[Any]:
    if n <= 1:
      return n
    _lowerCAmelCase       :  Optional[Any]   				=					identity(2		)
    _lowerCAmelCase       :  Union[str, Any]   				=					[[1, 1], [1, 0]]
    _lowerCAmelCase       :  Tuple   				=					n - 1
    while n > 0:
      if n % 2 == 1:
        _lowerCAmelCase       :  Union[str, Any]   				=					multiply(lowercase__  ,      lowercase__		)
      _lowerCAmelCase       :  List[Any]   				=					multiply(lowercase__  ,      lowercase__		)
      _lowerCAmelCase       :  Optional[Any]   				=					int(n / 2		)
    return res_matrix[0][0]
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       int		)    ->						List[str]:
    if n <= 1:
      return n
    _lowerCAmelCase       :  Optional[Any]   				=					0
    _lowerCAmelCase       :  Optional[int]   				=					1
    for _ in range(2  ,      n + 1		):
      _lowerCAmelCase				,					_lowerCAmelCase       :  Any   				=					fiba, fiba + fiba
    return fiba
  
  
  def 	_UpperCAmelCase				(  )    ->						Union[str, Any]:
    for ordinal in "0th 1st 2nd 3rd 10th 100th 1000th".split():
      _lowerCAmelCase       :  str   				=					int("""""".join(c for c in ordinal if c in """0123456789"""		)		)  # 1000th --> 1000
      print(
          f'{ordinal} fibonacci number using matrix exponentiation is '
          f'{nth_fibonacci_matrix(lowercase__		)} and using bruteforce is '
          f'{nth_fibonacci_bruteforce(lowercase__		)}\n'		)
    # from timeit import timeit
    # print(timeit("nth_fibonacci_matrix(1000000)",
    #              "from main import nth_fibonacci_matrix", number=5))
    # print(timeit("nth_fibonacci_bruteforce(1000000)",
    #              "from main import nth_fibonacci_bruteforce", number=5))
    # 2.3342058970001744
    # 57.256506615000035
  
  
  if __name__ == "__main__":
       import doctest
  
       doctest.testmod()
       main()
  
  
  
style_context: 
  '''simple docstring'''
  
  from cva import COLOR_BGR2GRAY, cvtColor, imread, imshow, waitKey
  from numpy import divide, inta, multiply, ravel, sort, zeros_like
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       str  ,      _lowerCamelCase						:       List[Any]=3		)    ->						Union[str, Any]:
    _lowerCAmelCase       :  str   				=					int(mask / 2		)
    # copy image size
    _lowerCAmelCase       :  Dict   				=					zeros_like(_lowerCamelCase		)
    for i in range(_lowerCamelCase  ,      gray_img.shape[0] - bd		):
      for j in range(_lowerCamelCase  ,      gray_img.shape[1] - bd		):
        # get mask according with mask
        _lowerCAmelCase       :  Union[str, Any]   				=					ravel(gray_img[i - bd : i + bd + 1, j - bd : j + bd + 1]		)
        # calculate mask median
        _lowerCAmelCase       :  str   				=					sort(_lowerCamelCase		)[inta(divide((multiply(_lowerCamelCase  ,      _lowerCamelCase		))  ,      2		) + 1		)]
        _lowerCAmelCase       :  Dict   				=					median
    return median_img
  
  
  if __name__ == "__main__":
       # read original image
       UpperCamelCase_     			=       imread("""../image_data/lena.jpg""")
       # turn image in gray scale value
       UpperCamelCase_     			=       cvtColor(img, COLOR_BGR2GRAY)
  
       # get values with two different mask size
       UpperCamelCase_     			=       median_filter(gray, 3)
       UpperCamelCase_     			=       median_filter(gray, 5)
  
       # show result images
       imshow("""median filter with 3x3 mask""", medianaxa)
       imshow("""median filter with 5x5 mask""", medianaxa)
       waitKey(0)
  
  
  