docs: public void merge(Metadata other, Set<Key<?>> keys) {
      Preconditions.checkNotNull(other, "other");
      // Use ByteBuffer for equals and hashCode.
      Map<ByteBuffer, Key<?>> asciiKeys = new HashMap<>(keys.size());
      for (Key<?> key : keys) {
        asciiKeys.put(ByteBuffer.wrap(key.asciiName()), key);
      }
      for (int i = 0; i < other.size; i++) {
        ByteBuffer wrappedNamed = ByteBuffer.wrap(other.name(i));
        if (asciiKeys.containsKey(wrappedNamed)) {
          maybeExpand();
          name(size, other.name(i));
          value(size, other.value(i));
          size++;
        }
      }
    }