'Make a new function from a given template and update the signature'

def make(self, src_templ, evaldict=None, addsource=False, **attrs):

    src = (src_templ % vars(self))
    evaldict = (evaldict or {})
    mo = DEF.match(src)
    if (mo is None):
        raise SyntaxError(('not    a    valid    function    template\n%s' % src))
    name = mo.group(1)
    names = set(([name] + [arg.strip('    *') for arg in self.shortsignature.split(',')]))
    for n in names:
        if (n in ('_func_', '_call_')):
            raise NameError(('%s    is    overridden    in\n%s' % (n, src)))
    if (not src.endswith('\n')):
        src += '\n'
    try:
        code = compile(src, '<string>', 'single')
        exec code in evaldict
    except:
        print('Error    in    generated    code:', file=sys.stderr)
        print(src, file=sys.stderr)
        raise
    func = evaldict[name]
    if addsource:
        attrs['__source__'] = src
    self.update(func, **attrs)
    return func
