code: private static IRI mergeProfiles(final IRI... profiles) {
          Boolean isExpanded = true;
          Boolean isFlattened = false;
  
          for (final IRI uri : profiles) {
              if (compacted_flattened.equals(uri) || expanded_flattened.equals(uri)) {
                  return uri;
              }
  
              if (flattened.equals(uri)) {
                  isFlattened = true;
              } else if (compacted.equals(uri)) {
                  isExpanded = false;
              } else if (expanded.equals(uri)) {
                  isExpanded = true;
              }
          }
          if (isFlattened) {
              return isExpanded ? expanded_flattened : compacted_flattened;
          }
          return isExpanded ? expanded : compacted;
      }
docs: This will combine multiple JSON-LD profiles into a single profile. For example,
  jsonld:compacted + jsonld:flattened = jsonld:compacted_flattened
  The default (i.e. no arguments) is jsonld:expanded
  Multiple, conflicting profiles (e.g. jsonld:compacted + jsonld:expanded) will result
  in a "last profile wins" situation. Profile IRIs that are not part of the JSON-LD
  vocabulary are ignored.