code: def customchain(**kwargsChain):
      
  
      def wrap(f):
          @click.pass_context
          @verbose
          def new_func(ctx, *args, **kwargs):
              newoptions = ctx.obj
              newoptions.update(kwargsChain)
              ctx.bitshares = BitShares(**newoptions)
              ctx.blockchain = ctx.bitshares
              set_shared_bitshares_instance(ctx.bitshares)
              return ctx.invoke(f, *args, **kwargs)
  
          return update_wrapper(new_func, f)
  
      return wrap
docs: This decorator allows you to access ``ctx.bitshares`` which is
          an instance of BitShares. But in contrast to @chain, this is a
          decorator that expects parameters that are directed right to
          ``BitShares()``.
  
          ... code-block::python
  
                  @main.command()
                  @click.option("--worker", default=None)
                  @click.pass_context
                  @customchain(foo="bar")
                  @unlock
                  def list(ctx, worker):
                     print(ctx.obj)