def turtle_functions(backend):
    """
    Return a dictionary with all turtle-related functions.
    """
    if backend == 'tk':
        from .turtle.tk import make_turtle_namespace
        ns = make_turtle_namespace()
    elif backend == 'qt':
        from .turtle.qt import make_turtle_namespace
        ns = make_turtle_namespace()
    else:
        raise ValueError('invalid backend: %r' % backend)
    return ns
