def on_functiondef(self, node):
        # ('name', 'args', 'body', 'decorator_list')
        if node.decorator_list != []:
            raise Warning("decorated procedures not supported!")
        kwargs = []
        offset = len(node.args.args) - len(node.args.defaults)
        for idef, defnode in enumerate(node.args.defaults):
            defval = self.run(defnode)
            keyval = self.run(node.args.args[idef+offset])
            kwargs.append((keyval, defval))
        # kwargs.reverse()
        if six.PY3:
            args = [tnode.arg for tnode in node.args.args[:offset]]
        else:
            args = [tnode.id for tnode in node.args.args[:offset]]
        doc = None
        if (isinstance(node.body[0], ast.Expr) and
            isinstance(node.body[0].value, ast.Str)):
            docnode = node.body[0]
            doc = docnode.value.s
        vararg = node.args.vararg
        varkws = node.args.kwarg
        if six.PY3:
            vararg = self.run(vararg)
            varkws = self.run(varkws)
        proc = Procedure(node.name, _larch=self, doc= doc,
                         body   = node.body,
                         fname  = self.fname,
                         lineno = self.lineno,
                         args   = args,
                         kwargs = kwargs,
                         vararg = vararg,
                         varkws = varkws)
        self.symtable.set_symbol(node.name, value=proc)

    # imports
define procedures
dataset/ETHPy150Open xraypy/xraylarch/lib/interpreter.py/Interpreter.on_functiondef