[misc] move some helper functions from ProjectStructureTests into User GitOrigin-RevId: d5d1bbf9aa31a9f248e03b1fa3deb0378dce7a7b