Get_graph_node_names function call on FASTERRCNN_RESNET50_FPN_V2

I am trying to create a feature extractor using the FASTERRCNN_RESNET50_FPN_V2 model. Specifically I want to get the box_head outputs for each input image. I understand that the FX has something called leafs to enable this functionality but I haven’t been successful to get it done. Any ideas as to how this can be implemented?