The suit challenges state and local laws that limit police from cooperating with federal immigration authorities.