Then simply always return the mask. I think, it#s a bad design choice to have a dynamic number of output variables…