YAML raises this error when we try to serialize a class:

  TypeError: can't dump anonymous class Class

Work around this by representing a class by its name.