Is it possible to save and restore the specification of a `beamer` template? 

* In this specific case, I would like to save and restore the
`background canvas` template.

Alternatively (even better, in fact), is it possible to limit the scope of a template specification? 

* The thought here is that it is possible to do this with things like
font switches and colour changes (stick curly brackets around
`\sffamily` or `\color{red}` to limit the scope). Is there an
equivalent for changes to `beamer` templates?

MWE:

```
\documentclass{beamer}

\setbeamertemplate{background canvas}[vertical shading][top=blue!20,bottom=blue!20,middle=blue!5,midpoint=.5]
\newcommand*{\canvasdu}{\setbeamertemplate{background canvas}[vertical shading][top=black!90,bottom=black!90,middle=black!70,midpoint=.5]}

\title[Short title]{Title}
\author{Mari Jones}
\date{\today}

\begin{document}
  \begin{frame}
    \titlepage
  \end{frame}

  {\canvasdu
  \begin{frame}
    \color{red}A special frame
  \end{frame}}

  \begin{frame}
    A bog-standard frame
  \end{frame}

\end{document}

```

![Template transformations](https://i.stack.imgur.com/vJtSo.png)

That is, I would like to restore the original configuration of `background canvas` for the third frame **without knowing that it used blue vertical shading**.

Another possibility I've wondered about is *cloning* the template in the `\canvasdu` command. However, this strikes me as a somewhat inelegant approach.