def METHOD_NAME(func):
    """Decorates function to reset the current thread's Django database
    connection on exceptions that appear to come from connection resets.
    """
    def _reset(*args, **kwargs):
        try:
            return func(*args, **kwargs)
        except (
            InterfaceError,
            OperationalError,
            DjangoInterfaceError,
            DjangoOperationalError,
        ) as error:
            thread = threading.current_thread()
            _logger.warning(
                "it appears this thread's database connection was "
                "dropped, resetting it now - you may see further "
                "errors about this until the situation is fully "
                "resolved for all threads "
                "(this thread is '%s', function was: %r, error was '%s')",
                thread.name,
                func,
                error,
            )
            django.db.connection.connection = None
            raise ResetDBConnectionError("The database connection was reset", error)
    return wraps(func)(_reset)