Fix issue where functions mutate external datasets
Fix issue where functions mutate external datasets: a task in lifesci-single-cell-spatial-swe-envs-nocap (Harbor dataset). Title: Fix issue where functions mutate external datasets
The task
**Title:** Fix issue where functions mutate external datasets
Part of scalingX/lifesci-single-cell-spatial-swe-envs-nocap.