def func_args(self, node, current_klass, function_name, bind_type, args, stararg, dstararg):
        try:
            bind_type = BIND_TYPES_NUMERIC[bind_type]
        except __HOLE__:
            raise TranslationError("Unknown bind type: %s" % bind_type, node)
        _args = []
        default_pos = len(args) - len(node.defaults)
        for idx, arg in enumerate(args):
            if idx < default_pos:
                _args.append("['%s']" % arg)
            else:
                default_value = self.expr(node.defaults[idx-default_pos], current_klass)
                _args.append("""['%s', %s]""" % (arg, default_value))
        args = ",".join(_args)
        if dstararg:
            args = "['%s'],%s" % (dstararg, args)
        else:
            args = "null,%s" % args
        if stararg:
            args = "'%s',%s" % (stararg, args)
        else:
            args = "null,%s" % args
        args = '[' + args + ']'
        # remove any empty tail
        if args.endswith(',]'):
            args = args[:-2] + ']'
        if function_name is None:
            self.w( "\t, %d, %s);" % (bind_type, args))
        else:
            self.w( self.spacing() + "%s.__bind_type__ = %s;" % (function_name, bind_type))
            self.w( self.spacing() + "%s.__args__ = %s;" % (function_name, args))
dataset/ETHPy150Open anandology/pyjamas/pyjs/src/pyjs/translator_proto.py/Translator.func_args