code: static void transformExtends(EntityType entityType, Map<String, EntityType> newEntityTypes) {
      if (newEntityTypes.isEmpty()) {
        return;
      }
  
      EntityType entityTypeExtends = entityType.getExtends();
      if (entityTypeExtends != null) {
        String extendsId = entityTypeExtends.getId();
        if (newEntityTypes.containsKey(extendsId)) {
          entityType.setExtends(newEntityTypes.get(extendsId));
        }
      }
    }
docs: Changes the parent of an {@link EntityType} to let it inherit from another, new EntityType.
  Does nothing if the Map does not contain the ID of the current parent EntityType.
  
  @param entityType the EntityType to update
  @param newEntityTypes a Map of (old) EntityType IDs and new EntityTypes