docs: def clone(self):
          ''' Returns a shallow copy of the current instance, except that all
          variables are deep-cloned.
          '''
          clone = copy(self)
          clone.variables = {k: v.clone() for (k, v) in self.variables.items()}
          return clone