def METHOD_NAME(self, func=None, **kwargs):
    if func is None:
        # When called with kwargs, e.g. @helper.use_vcr(inject_cassette=True)
        return functools.partial(self.METHOD_NAME, **kwargs)
    inject_cassette = kwargs.get('inject_cassette', False)
    kwargs['inject_cassette'] = True
    if 'path' not in kwargs:
        module = func.__module__.split('tests.')[-1].split('.')[-1]
        class_name = inspect.stack()[1][3]
        cassette_name = '.'.join([module, class_name, func.__name__])
        kwargs.setdefault('path', cassette_name)
    @METHOD_NAME(**kwargs)
    def wrapped(func_self, cassette, *args, **wkwargs):
        try:
            if inject_cassette:
                func(func_self, cassette, *args, **wkwargs)
            else:
                func(func_self, *args, **wkwargs)
        finally:
            self.hide_sensitive_data(cassette)
    return wrapped