Graphs with prescribed Levi form trace