def name_validator(func):
    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        func_args = inspect.getcallargs(func, *args, **kwargs)

        if func_args.get('validate'):
            _filter = "!@#$%^&*()-+=[]{}|\"'."
            name = func_args.get('name').replace('.py', '')\
                                        .replace('.html', '')\
                                        .replace('.txt', '')

            if (len(list(set(list(name)).intersection(list(_filter)))) > 0
                    or name[0].isdigit()):
                title = func.__name__.split('_')[1].title()
                raise globals()['Invalid' + title + 'Name']

        return func(*args, **kwargs)
    return wrapper
dataset/ETHPy150Open Parkayun/initpy/initpy/creator.py/name_validator/original