in sapp/trace_graph.py [0:0]
def _compute_valid_frame_leaves(self, frame: TraceFrame) -> Set[int]:
leaf_mapping = frame.leaf_mapping
is_leaf_frame = self.is_leaf_port(frame.callee_port)
if not is_leaf_frame:
callee_frames = self.get_next_trace_frames(frame)
callee_leaf_ids = {
callee_map.caller_leaf
for callee_frame in callee_frames
for callee_map in callee_frame.leaf_mapping
}
else:
callee_leaf_ids = set()
return {
leaf_map.transform
for leaf_map in leaf_mapping
if is_leaf_frame or (leaf_map.callee_leaf in callee_leaf_ids)
}