The production of precarious territories through the legal device