public static <T> T deepCopy(T o) {
    T copy = null;
    try {
      if (o == null) {
        return null;
      } else if (o instanceof Token || isWellKnownImmutableInstance(o)) {
        return o;
      } else {
        copy = doDeepCopy(o);
        return copy;
      }
    } finally {
      if (copy != null) {
        PdxUnreadData.copy(o, copy);
      }
    }
  }
Makes a deep copy of the specified object o using serialization, so the object has to be
serializable by GemFire.

<p>
If o is a {@link #isWellKnownImmutableInstance(Object) well known immutable instance} then it
will be returned without copying it.

<p>
The passed in object is serialized in memory, and then deserialized into a new instance, which
is returned. If GemFire serialization is implemented for the object, it is used; otherwise,
java serialization is used.

@param <T> the type of the object to be copied
@param o the original object to be copied
@return the new instance that is a copy of the original
@throws CopyException if copying fails because a class could not be found or could not be
        serialized
@see #copy(Object)
geode-core/src/main/java/org/apache/geode/CopyHelper.java