def script_body(self, name, args = None, namespace = None):
        function = self.get_script(name, namespace)
        if not function:
            return None

        param_string = re.search(r'\(([\w=\'", ]+)\)', function.signature)
        params = [ParamDefault(param.split('=')) for param in
                    param_string.group(1).split(',')] if param_string else None

        if isinstance(args, dict):
            param_defaults = \
                OrderedDict([val + (None,)
                    if len(val) == 1 else val for val in params])

            for param in params:
                if len(param) == 2 and param[0] not in args:
                    # Use default value
                    args[param[0]] = literal_eval(param[1])
            args = {k:v for k,v in args.items() if k in param_defaults.keys()}
        elif isinstance(args, tuple) or isinstance(args, list):
            args = { params[i][0]: args[i] if i < len(args)
                                           else literal_eval(params[i][1])
                        for i in range(0, max(len(params), len(args)))
                            if len(args) < i or len(params[i]) == 2 }
        else:
            if params:
                if args:
                    args = { params[0][0]: args }
                else:
                    if len(params[0]) == 2:
                        args = { params[0][0]: literal_eval(params[0][1]) }
                    else:
                        args = {}
            else:
                args = {}

        split_body = re.split(r'([\"\'])', function.body)

        replacements = {}
        for k, v in args.items():
            if isinstance(v, str) or isinstance(v, datetime):
                replacements[k] = "'{}'".format(v)
            elif sys.version_info[0] < 3 and isinstance(v, unicode):
                replacements[k] = repr(v.encode('utf-8'))
            else:
                replacements[k] = '{}'.format(v)

        for i, s in enumerate(split_body):
            if i % 4 == 0:
                for k, v in replacements.items():
                    split_body[i] = re.sub(r'\b{}\b'.format(k),
                                           v, split_body[i])

        return ''.join(split_body)
dataset/ETHPy150Open mogui/pyorient/pyorient/scripts.py/Scripts.script_body/swapped operands of `<`