Mutable datastructure to preserve mapping between proto and cpg nodes during ProtoToCpg import.
Context: we need to run two passes: 1) add nodes and 2) set node properties and add edges (this is due to flatgraph-specific implementation details)
Because of that, we need to remember the mapping from proto node id to gnode. Typically that's just a plain mapping, but there's one special case for TYPE nodes: some (parallel) frontends create duplicate TYPE nodes which we need to deduplicate...
This will fail hard if the DiffGraph hasn't been applied yet, which is the assumption for it's use case. In other words, we specifically don't want to invoke find(protoNode).flatMap(_.storedRef) here
This will fail hard if the DiffGraph hasn't been applied yet, which is the assumption for it's use case. In other words, we specifically don't want to invoke find(protoNode).flatMap(_.storedRef) here
This will fail hard if the DiffGraph hasn't been applied yet, which is the assumption for it's use case. In other words, we specifically don't want to invoke find(protoNode).flatMap(_.storedRef) here
This will fail hard if the DiffGraph hasn't been applied yet, which is the assumption for it's use case. In other words, we specifically don't want to invoke find(protoNode).flatMap(_.storedRef) here
Note that this doesn't (and cannot) check for duplicate nodes with the same TYPE.FULL_NAME, because we only have the protoNodeId and not the node itself.