code: void mapTraitInstanceToVertex(ITypedStruct traitInstance, IDataType entityType, AtlasVertex parentInstanceVertex)
              throws AtlasException {
          // add a new AtlasVertex for the struct or trait instance
          final String traitName = traitInstance.getTypeName();
          AtlasVertex traitInstanceVertex = graphHelper.createVertexWithoutIdentity(traitInstance.getTypeName(), null,
                  typeSystem.getDataType(TraitType.class, traitName).getAllSuperTypeNames());
          if (LOG.isDebugEnabled()) {
              LOG.debug("created vertex {} for trait {}", string(traitInstanceVertex), traitName);
          }
  
          // map all the attributes to this newly created AtlasVertex
          mapInstanceToVertex(traitInstance, traitInstanceVertex, traitInstance.fieldMapping().fields, false, Operation.CREATE);
  
          // add an edge to the newly created AtlasVertex from the parent
          String relationshipLabel = GraphHelper.getTraitLabel(entityType.getName(), traitName);
          graphHelper.getOrCreateEdge(parentInstanceVertex, traitInstanceVertex, relationshipLabel);
      }
docs: ****************************************** TRAITS ***************************************************