def METHOD_NAME(self, name, snippet):
    if snippet is not None and len(snippet.code) > 0:
        try:
            self.single_level_tester(
                code=snippet.code,
                level=int(snippet.level),
                lang=snippet.language,
                translate=False
            )
        except hedy.exceptions.CodePlaceholdersPresentException:  # Code with blanks is allowed
            pass
        except OSError:
            return None  # programs with ask cannot be tested with output :(
        except exceptions.HedyException as E:
            try:
                location = E.error_location
            except BaseException:
                location = 'No Location Found'
            # Must run this in the context of the Flask app, because FlaskBabel requires that.
            with app.app_context():
                with force_locale('en'):
                    error_message = translate_error(E.error_code, E.arguments, 'en')
                    error_message = error_message.replace('<span class="command-highlighted">', '`')
                    error_message = error_message.replace('</span>', '`')
                    print(f'\n----\n{snippet.code}\n----')
                    print(f'from adventure {snippet.adventure_name}')
                    print(f'in language {snippet.language} from level {snippet.level} gives error:')
                    print(f'{error_message} at line {location}')
                    raise E