Mask is currently modified in place and then returned. Make a defensive copy to make sure there aren't any downstream errors. https://github.com/sabeenlohawala/tissue_labeling/blob/64a6e87c087f057b9ebfd522d2e4b86054386875/TissueLabeling/brain_utils.py#L187C1-L187C62