private boolean checkForAndApplySerializerOverride(final Map<Class<?>, Serializer<?>> serializerOverrides,
                                                       final Kryo kryo, Class<?> targetClass) {
        if (serializerOverrides.containsKey(targetClass)) {
            final Serializer<?> ser = serializerOverrides.get(targetClass);
            if (null == ser) {
                // null means use Kryo's default serializer
                log.debug("Registering {} with default serializer per overrides", targetClass);
                kryo.register(targetClass);
            } else {
                // nonnull means use that serializer
                log.debug("Registering {} with serializer {} per overrides", targetClass, ser);
                kryo.register(targetClass, ser);
            }
            return true;
        }
        return false;
    }
Register TinkerPop's classes with the supplied {@link Kryo} instance
while honoring optional overrides and optional class blacklist ("blackset"?).

@param kryo                the Kryo serializer instance with which to register types
@param serializerOverrides serializer mappings that override this class's defaults
@param blacklist           classes which should not be registered at all, even if there is an override entry
                           or if they would be registered by this class by default (does not affect Kryo's
                           built-in registrations, e.g. String.class).
spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/gryo/GryoRegistrator.java