code: @Override
    public void enterVertex(GDLParser.VertexContext vertexContext) {
      String variable = getVariable(vertexContext.header());
      Vertex v;
      if (variable != null && userVertexCache.containsKey(variable)) {
        v = userVertexCache.get(variable);
      } else {
        v = initNewVertex(vertexContext);
  
        if (variable != null) {
          userVertexCache.put(variable, v);
        } else {
          variable = String.format(ANONYMOUS_VERTEX_VARIABLE, v.getId());
          autoVertexCache.put(variable, v);
        }
        v.setVariable(variable);
        vertices.add(v);
      }
      updateGraphElement(v);
      setLastSeenVertex(v);
      updateLastSeenEdge(v);
    }
docs: Called when parser enters a vertex context.
  
  Checks if the vertex has already been created (using its variable). If not, a new vertex is
  created and added to the vertex cache.
  
  @param vertexContext vertex context