def foo(**kwargs): x = kwargs['x_param'] run(x_param) def bar(): foo(x_)