New York City is taking the Trump administration to court over a new immigration rule that could make an immigrant’s…