How to make dynamic stub functions on the fly?
<p>I have a class with about 200 stub functions, they look something like this:</p>

<pre><code>def name1(self, **kwargs):
    return self.run('name-1', kwargs)

def name2(self, ** kwargs):
    return self.run('name-2', kwargs)
</code></pre>

<p>So on and so forth.</p>

<p>There is a run function that takes care of the real work.</p>

<p>I want to reduce the 200 stub function to just 1 dynamic function that gets called when you make a call to the class with a method name that doesn't exist.</p>

<p>How do I do this?</p>