docs: def attributes(attrs):
      """Returns an attribute list, constructed from the
      dictionary attrs.
      """
      attrs = attrs or {}
      ident = attrs.get("id", "")
      classes = attrs.get("classes", [])
      keyvals = [[x, attrs[x]] for x in attrs if (x != "classes" and x != "id")]
      return [ident, classes, keyvals]