Delegation of Immigration Authority Section 287(g) Immigration and Nationality

In anticipation of changes to deportation policy federally, what can Massachusetts do to keep ICE enforcement actions relatively humane, at least in this state? The wording here, https://www.ice.gov/287g , suggests to me that putting state and local officers on this task is something a state chooses to do itself not something imposed on it from …