code: 
  
  
  
  
  
  
  from collections import namedtuple
  
  __A  							=  namedtuple("from_to", "from_ to")
  
  __A  							=  {
      '''atm''': from_to(1, 1),
      '''pascal''': from_to(0.000_0098, 10_13_25),
      '''bar''': from_to(0.98_6923, 1.0_1325),
      '''kilopascal''': from_to(0.0098_6923, 101.325),
      '''megapascal''': from_to(9.8_6923, 0.10_1325),
      '''psi''': from_to(0.06_8046, 14.6959),
      '''inHg''': from_to(0.033_4211, 29.9213),
      '''torr''': from_to(0.0013_1579, 7_60),
  }
  
  
  
  
  
  
  
  def 			lowercase__  (				A_     ,			A_     ,			A_		)  ->							float:
  
  
  
  
  
  
  
         """simple docstring"""
  
  
  
  
  
  
         if from_type not in PRESSURE_CONVERSION:
                raise ValueError(
                    F'''Invalid \'from_type\' value: {from_type!r}  Supported values are:\n'''
                    + """, """.join(__lowerCAmelCase		)		)
         if to_type not in PRESSURE_CONVERSION:
                raise ValueError(
                    F'''Invalid \'to_type\' value: {to_type!r}.  Supported values are:\n'''
                    + """, """.join(__lowerCAmelCase		)		)
         return (
             value * PRESSURE_CONVERSION[from_type].from_ * PRESSURE_CONVERSION[to_type].to
         )
  
  
  if __name__ == "__main__":
     import doctest
  
     doctest.testmod()
  
  
  
  
  
style_context: 
  
  
  
  
  
  
  from cva import COLOR_BGR2GRAY, cvtColor, imread, imshow, waitKey
  from numpy import divide, inta, multiply, ravel, sort, zeros_like
  
  
  
  
  
  
  
  def 			lowercase__  (				A_:	int     ,			A_:	Any=3		)  ->							Dict:
  
  
  
  
  
  
  
         """simple docstring"""
  
  
  
  
  
  
         __UpperCAmelCase    							=int(mask / 2		)
         # copy image size
         __UpperCAmelCase    							=zeros_like(A_		)
         for i in range(A_     ,			gray_img.shape[0] - bd		):
                for j in range(A_     ,			gray_img.shape[1] - bd		):
                       # get mask according with mask
                       __UpperCAmelCase    							=ravel(gray_img[i - bd : i + bd + 1, j - bd : j + bd + 1]		)
                       # calculate mask median
                       __UpperCAmelCase    							=sort(A_		)[inta(divide((multiply(A_     ,			A_		))     ,			2		) + 1		)]
                       __UpperCAmelCase    							=median
         return median_img
  
  
  if __name__ == "__main__":
     # read original image
     __A  							=  imread("../image_data/lena.jpg")
     # turn image in gray scale value
     __A  							=  cvtColor(img, COLOR_BGR2GRAY)
  
     # get values with two different mask size
     __A  							=  median_filter(gray, 3)
     __A  							=  median_filter(gray, 5)
  
     # show result images
     imshow("median filter with 3x3 mask", medianaxa)
     imshow("median filter with 5x5 mask", medianaxa)
     waitKey(0)
  
  
  
  
  