docs: private static Object copy(Object object) {
          if (object instanceof byte[]) {
              byte[] data = (byte[]) object;
              return Arrays.copyOf(data, data.length);
          }
          return object;
      }
  
      /**
       * Makes a deep copy of a {@link Map}. Immutable objects in the map will be shared (e.g., integers, strings,
       * immutable messages) and mutable ones will have a copy (e.g., byte arrays, mutable messages).
       *
       * @param <K> the key type
       * @param <V> the value type
       * @param map the map
       * @return the map
       */
      @SuppressWarnings("unchecked")
      static <K, V> Map<K, V> copy(Map<K, V> map) {
          Map<K, V> result = new LinkedHashMap<K, V>();
          for (Map.Entry<K, V> entry : map.entrySet()) {
              result.put(entry.getKey(), (V) copy(entry.getValue()));
          }