def get_expression_instance(self, field):
    try:
        if (field in self.expression_instance_cache):
            expression = self.expression_instance_cache[field]
        else:
            expression = eval(parse_field(field))
            self.expression_instance_cache[field] = expression
    except NameError as e:
        get_module_logger('data').exception(('ERROR: field [%s] contains invalid operator/variable [%s]' % (str(field), str(e).split()[1])))
        raise
    except SyntaxError:
        get_module_logger('data').exception(('ERROR: field [%s] contains invalid syntax' % str(field)))
        raise
    return expression
def get_expression_instance(self, field):
    try:
        if (field in self.expression_instance_cache):
            expression = self.expression_instance_cache[field]
        else:
            expression = eval(parse_field(field))
            self.expression_instance_cache[field] = expression
    except NameError as e:
        get_module_logger('data').exception(('ERROR: field [%s] contains invalid operator/variable [%s]' % (str(field), str(e).split()[1])))
        raise
    except SyntaxError:
        get_module_logger('data').exception(('ERROR: field [%s] contains invalid syntax' % str(field)))
        raise
    return expression