code: @Override
      @GraphTransaction
      public void addTrait(String guid, ITypedStruct traitInstance) throws RepositoryException {
          Preconditions.checkNotNull(guid, "guid cannot be null");
          Preconditions.checkNotNull(traitInstance, "Trait instance cannot be null");
  
          GraphTransactionInterceptor.lockObjectAndReleasePostCommit(guid);
          addTraitImpl(guid, traitInstance);
      }
docs: Adds a new trait to an existing entity represented by a guid.
  
  @param guid          globally unique identifier for the entity
  @param traitInstance trait instance that needs to be added to entity
  @throws RepositoryException