def set_global_serializer(serializer, deserializer):
    """
    Call at the start of a script
    """
    assert callable(serializer) and callable(deserializer)
    global _SERIALIZER, _DESERIALIZER
    _SERIALIZER = serializer
    _DESERIALIZER = deserializer

    Call at the start of a script
    
surreal/utils/serializer.py