y (np.ndarray): Mosaicked image to be reconstructed.
cfa (str): Name of the CFA. Can be bayer or quad_bayer.
Returns:
np.ndarray: Demosaicked image.
"""
#The code implemented here comes from an open-source python library that has optimized the two methods presented.
#This library is based on the "color" library, specific to color image processing.
#The source code for the following functions can be found in the "demosaicing" folder in the following git hub: https://github.com/colour-science/colour-demosaicing