def customchain(**kwargsChain):
def wrap(f):<EOL><INDENT>@click.pass_context<EOL>@verbose<EOL>def new_func(ctx, *args, **kwargs):<EOL><INDENT>newoptions = ctx.obj<EOL>newoptions.update(kwargsChain)<EOL>ctx.peerplays = PeerPlays(**newoptions)<EOL>ctx.blockchain = ctx.peerplays<EOL>set_shared_peerplays_instance(ctx.peerplays)<EOL>return ctx.invoke(f, *args, **kwargs)<EOL><DEDENT>return update_wrapper(new_func, f)<EOL><DEDENT>return wrap<EOL>
This decorator allows you to access ``ctx.peerplays`` which is
        an instance of Peerplays. But in contrast to @chain, this is a
        decorator that expects parameters that are directed right to
        ``PeerPlays()``.

        ... code-block::python

                @main.command()
                @click.option("--worker", default=None)
                @click.pass_context
                @customchain(foo="bar")
                @unlock
                def list(ctx, worker):
                   print(ctx.obj)