def _get_scoped_G(G, scope): if scope is None: return G if not hasattr(G, "scopes"): G.scopes = dict() if scope not in G.scopes: G.scopes[scope] = SharedGlobal() G.scopes[scope].worker_id = G.worker_id return G.scopes[scope]
def _get_scoped_G(G, scope): #from IPython import embed;embed() if scope is None: return G if not hasattr(G, "scopes"): G.scopes = dict() if scope not in G.scopes: G.scopes[scope] = SharedGlobal() G.scopes[scope].worker_id = G.worker_id return G.scopes[scope]