Serializer factory for types which state can be natively serialized.

    Arguments:

        getstate (callable): takes an object and returns the object's state
            to be passed to `pokeNative`.

    Returns:

        callable: serializer (`poke` routine).

def poke_native(getstate):
    """
    Serializer factory for types which state can be natively serialized.

    Arguments:

        getstate (callable): takes an object and returns the object's state
            to be passed to `pokeNative`.

    Returns:

        callable: serializer (`poke` routine).

    """
    def poke(service, objname, obj, container, visited=None, _stack=None):
        service.pokeNative(objname, getstate(obj), container)
    return poke