code: @Override
      @GraphTransaction
      public void addTrait(List<String> entityGuids, ITypedStruct traitInstance) throws RepositoryException {
          Preconditions.checkNotNull(entityGuids, "entityGuids list cannot be null");
          Preconditions.checkNotNull(traitInstance, "Trait instance cannot be null");
  
          if (LOG.isDebugEnabled()) {
              LOG.debug("Adding a new trait={} for entities={}", traitInstance.getTypeName(), entityGuids);
          }
  
          GraphTransactionInterceptor.lockObjectAndReleasePostCommit(entityGuids);
          for (String entityGuid : entityGuids) {
              addTraitImpl(entityGuid, traitInstance);
          }
      }
docs: Adds a new trait to the list of entities represented by their respective guids
  @param entityGuids   list of globally unique identifier for the entities
  @param traitInstance trait instance that needs to be added to entities
  @throws RepositoryException