code: @Override
      public void deleteTrait(String guid, String traitNameToBeDeleted) throws AtlasException {
          guid                 = ParamChecker.notEmpty(guid, "entity id");
          traitNameToBeDeleted = ParamChecker.notEmpty(traitNameToBeDeleted, "trait name");
  
          // ensure trait type is already registered with the TS
          if (!typeSystem.isRegistered(traitNameToBeDeleted)) {
              final String msg = String.format("trait=%s should be defined in type system before it can be deleted",
                      traitNameToBeDeleted);
              LOG.error(msg);
              throw new TypeNotFoundException(msg);
          }
  
          repository.deleteTrait(guid, traitNameToBeDeleted);
  
          onTraitDeletedFromEntity(repository.getEntityDefinition(guid), traitNameToBeDeleted);
      }
docs: Deletes a given trait from an existing entity represented by a guid.
  
  @param guid                 globally unique identifier for the entity
  @param traitNameToBeDeleted name of the trait
  @throws AtlasException