code: func (g *Graph) createVertex_locked(vertexType vertexType, namespace, name string) *namedVertex {
  	typedVertices, exists := g.vertices[vertexType]
  	if !exists {
  		typedVertices = namespaceVertexMapping{}
  		g.vertices[vertexType] = typedVertices
  	}
  
  	namespacedVertices, exists := typedVertices[namespace]
  	if !exists {
  		namespacedVertices = map[string]*namedVertex{}
  		typedVertices[namespace] = namespacedVertices
  	}
  
  	vertex := newNamedVertex(vertexType, namespace, name, g.graph.NewNodeID())
  	namespacedVertices[name] = vertex
  	g.graph.AddNode(vertex)
  
  	return vertex
  }
docs: // must be called under a write lock