filed a lawsuit in response to the U.S. government’s threat to withhold funding for public safety in cities and counties that refused to cooperate with federal immigration officials