code: def hetero_from_shared_memory(name):
      """Create a heterograph from shared memory with the given name.
  
      The newly created graph will have the same node types and edge types as the original graph.
      But it does not have node features or edges features.
  
      Paramaters
      ----------
      name : str
          The name of the share memory
  
      Returns
      -------
      HeteroGraph (in shared memory)
      """
      (
          g,
          ntypes,
          etypes,
      ) = heterograph_index.create_heterograph_from_shared_memory(name)
      return DGLGraph(g, ntypes, etypes)
  
imports: from collections import defaultdict
  from collections.abc import Mapping
  import networkx
  import numpy
  from scipy.sparse import spmatrix
  from .None import backend, graph_index, heterograph_index, utils
  from .base import DGLError, EID, ETYPE, NID, NTYPE
  from .heterograph import combine_frames, DGLBlock, DGLGraph
label_desc: Use image node_id 2 for calling a global function with example usage: hetero_from_shared_memory(name) and returns: DGLGraph