def graft(func=None, *, namespace=None):
if not func:<EOL><INDENT>return functools.partial(graft, namespace=namespace)<EOL><DEDENT>if isinstance(func, Graft):<EOL><INDENT>return func<EOL><DEDENT>return Graft(func, namespace=namespace)<EOL>
Decorator for marking a function as a graft.

    Parameters:
        namespace (str): namespace of data, same format as targeting.
    Returns:
        Graft

    For example, these grafts::

        @graft
        def foo_data:
            return {'foo', True}

        @graft(namespace='bar')
        def bar_data:
            return False

    will be redered has::

        {
            'foo': True,
            'bar': False
        }