code: def add_class(self, cls, callback):
          
          if cls.TAG in self._tag_map:
              raise ValueError(
                  "duplicate tag: {!r} is already handled by {}".format(
                      cls.TAG,
                      self._tag_map[cls.TAG]))
          self._class_map[cls] = callback
          self._tag_map[cls.TAG] = (cls, callback)
docs: Add a class `cls` for parsing as root level element. When an object of
          `cls` type has been completely parsed, `callback` is called with the
          object as argument.