@wraps(func)
def wrapper(self, *args, **kwargs):
    method_name = func.__name__
    all_args = dict(zip(method_arg_names, args))
    all_args.update(kwargs)
    if ('include_config' in kwargs):
        include_config = kwargs['include_config']
        del all_args['include_config']
    else:
        include_config = self.default_expectation_args['include_config']
    if ('catch_exceptions' in kwargs):
        catch_exceptions = kwargs['catch_exceptions']
        del all_args['catch_exceptions']
    else:
        catch_exceptions = self.default_expectation_args['catch_exceptions']
    if ('result_format' in kwargs):
        result_format = kwargs['result_format']
    else:
        result_format = self.default_expectation_args['result_format']
    if ('meta' in kwargs):
        meta = kwargs['meta']
        del all_args['meta']
    else:
        meta = None
    argspec = inspect.getfullargspec(func)[0][1:]
    if ('result_format' in argspec):
        all_args['result_format'] = result_format
    elif ('result_format' in all_args):
        del all_args['result_format']
    all_args = recursively_convert_to_json_serializable(all_args)
    expectation_args = copy.deepcopy(all_args)
    if self._expectation_suite.evaluation_parameters:
        (evaluation_args, substituted_parameters) = build_evaluation_parameters(expectation_args, self._expectation_suite.evaluation_parameters, self._config.get('interactive_evaluation', True), self._data_context)
    else:
        (evaluation_args, substituted_parameters) = build_evaluation_parameters(expectation_args, None, self._config.get('interactive_evaluation', True), self._data_context)
    expectation_config = ExpectationConfiguration(expectation_type=method_name, kwargs=expectation_args, meta=meta)
    raised_exception = False
    exception_traceback = None
    exception_message = None
    if (self._config.get('interactive_evaluation', True) or self._active_validation):
        try:
            return_obj = func(self, **evaluation_args)
            if isinstance(return_obj, dict):
                return_obj = ExpectationValidationResult(**return_obj)
        except Exception as err:
            if catch_exceptions:
                raised_exception = True
                exception_traceback = traceback.format_exc()
                exception_message = '{}: {}'.format(type(err).__name__, str(err))
                return_obj = ExpectationValidationResult(success=False)
            else:
                raise err
    else:
        return_obj = ExpectationValidationResult(expectation_config=copy.deepcopy(expectation_config))
    if (self._active_validation is True):
        stored_config = expectation_config
    else:
        stored_config = self._expectation_suite.add_expectation(expectation_config)
    if include_config:
        return_obj.expectation_config = copy.deepcopy(stored_config)
    if (return_obj.success is not None):
        stored_config.success_on_last_run = return_obj.success
    if catch_exceptions:
        return_obj.exception_info = {'raised_exception': raised_exception, 'exception_message': exception_message, 'exception_traceback': exception_traceback}
    if (len(substituted_parameters) > 0):
        if (meta is None):
            meta = dict()
        meta['substituted_parameters'] = substituted_parameters
    if (meta is not None):
        return_obj.meta = meta
    return_obj = recursively_convert_to_json_serializable(return_obj)
    if (self._data_context is not None):
        return_obj = self._data_context.update_return_obj(self, return_obj)
    return return_obj
@wraps(func)
def wrapper(self, *args, **kwargs):
    method_name = func.__name__
    all_args = dict(zip(method_arg_names, args))
    all_args.update(kwargs)
    if ('include_config' in kwargs):
        include_config = kwargs['include_config']
        del all_args['include_config']
    else:
        include_config = self.default_expectation_args['include_config']
    if ('catch_exceptions' in kwargs):
        catch_exceptions = kwargs['catch_exceptions']
        del all_args['catch_exceptions']
    else:
        catch_exceptions = self.default_expectation_args['catch_exceptions']
    if ('result_format' in kwargs):
        result_format = kwargs['result_format']
    else:
        result_format = self.default_expectation_args['result_format']
    if ('meta' in kwargs):
        meta = kwargs['meta']
        del all_args['meta']
    else:
        meta = None
    argspec = inspect.getfullargspec(func)[0][1:]
    if ('result_format' in argspec):
        all_args['result_format'] = result_format
    elif ('result_format' in all_args):
        del all_args['result_format']
    all_args = recursively_convert_to_json_serializable(all_args)
    expectation_args = copy.deepcopy(all_args)
    if self._expectation_suite.evaluation_parameters:
        (evaluation_args, substituted_parameters) = build_evaluation_parameters(expectation_args, self._expectation_suite.evaluation_parameters, self._config.get('interactive_evaluation', True), self._data_context)
    else:
        (evaluation_args, substituted_parameters) = build_evaluation_parameters(expectation_args, None, self._config.get('interactive_evaluation', True), self._data_context)
    expectation_config = ExpectationConfiguration(expectation_type=method_name, kwargs=expectation_args, meta=meta)
    raised_exception = False
    exception_traceback = None
    exception_message = None
    if (self._config.get('interactive_evaluation', True) or self._active_validation):
        try:
            return_obj = func(self, **evaluation_args)
            if isinstance(return_obj, dict):
                return_obj = ExpectationValidationResult(**return_obj)
        except Exception as err:
            if catch_exceptions:
                raised_exception = True
                exception_traceback = traceback.format_exc()
                exception_message = '{}: {}'.format(type(err).__name__, str(err))
                return_obj = ExpectationValidationResult(success=False)
            else:
                raise err
    else:
        return_obj = ExpectationValidationResult(expectation_config=copy.deepcopy(expectation_config))
    if (self._active_validation is True):
        stored_config = expectation_config
    else:
        stored_config = self._expectation_suite.add_expectation(expectation_config)
    if include_config:
        return_obj.expectation_config = copy.deepcopy(stored_config)
    if (return_obj.success is not None):
        stored_config.success_on_last_run = return_obj.success
    if catch_exceptions:
        return_obj.exception_info = {'raised_exception': raised_exception, 'exception_message': exception_message, 'exception_traceback': exception_traceback}
    if (len(substituted_parameters) > 0):
        if (meta is None):
            meta = dict()
        meta['substituted_parameters'] = substituted_parameters
    if (meta is not None):
        return_obj.meta = meta
    return_obj = recursively_convert_to_json_serializable(return_obj)
    if (self._data_context is not None):
        return_obj = self._data_context.update_return_obj(self, return_obj)
    return return_obj