Adding NewScopeWithGraph func to Scope struct. This enables the construction of an in-memory graph from a previously serialized form + new additions.