code: 
  
  
  
  
  '''simple docstring'''
  
  from cva import destroyAllWindows, imread, imshow, waitKey
  
  
  def 	_UpperCAmelCase				(  _lowerCamelCase						:       str  ,      _lowerCamelCase						:       Dict		)    ->						int:
    _lowerCAmelCase				,					_lowerCAmelCase       :  Tuple   				=					img.shape[0], img.shape[1]
  
    def to_grayscale(_lowerCamelCase						:       str  ,      _lowerCamelCase						:       List[Any]  ,      _lowerCamelCase						:       List[str]		):
      return 0.2126 * red + 0.587 * green + 0.114 * blue
  
    def normalize(_lowerCamelCase						:       int		):
      return min(_lowerCamelCase  ,      2_55		)
  
    for i in range(_lowerCamelCase		):
      for j in range(_lowerCamelCase		):
        _lowerCAmelCase       :  Any   				=					int(to_grayscale(*img[i][j]		)		)
        _lowerCAmelCase       :  Tuple   				=					[
            normalize(_lowerCamelCase		),
            normalize(greyscale + factor		),
            normalize(greyscale + 2 * factor		),
        ]
  
    return img
  
  
  if __name__ == "__main__":
       # read original image
       UpperCamelCase_     			=       {
           percentage: imread("""image_data/lena.jpg""", 1) for percentage in (10, 20, 30, 40)
       }
  
       for percentage, img in images.items():
            make_sepia(img, percentage)
  
       for percentage, img in images.items():
            imshow(F'Original image with sepia (factor: {percentage})', img)
  
       waitKey(0)
       destroyAllWindows()
  
  
  
style_context: 
  '''simple docstring'''
  
  import os
  
  
  def 	_UpperCAmelCase				(  )    ->						int:
    _lowerCAmelCase       :  Optional[int]   				=					os.path.dirname(os.path.realpath(_lowerCamelCase		)		)
    _lowerCAmelCase       :  Optional[Any]   				=					os.path.join(_lowerCamelCase  ,      """triangle.txt"""		)
  
    with open(_lowerCamelCase		) as in_file:
      _lowerCAmelCase       :  List[Any]   				=					[[int(_lowerCamelCase		) for i in line.split()] for line in in_file]
  
    while len(_lowerCamelCase		) != 1:
      _lowerCAmelCase       :  Any   				=					triangle.pop()
      _lowerCAmelCase       :  List[str]   				=					triangle[-1]
      for j in range(len(_lowerCamelCase		) - 1		):
        curr_row[j] += max(last_row[j]  ,      last_row[j + 1]		)
    return triangle[0][0]
  
  
  if __name__ == "__main__":
       print(solution())
  
  
  