class_docstr: Widget that can be inserted into the DOM
  
  Parameters
  ----------
  tooltip: str
     tooltip caption
  layout: InstanceDict(Layout)
     widget layout
class_docstr_tok: ["Widget","that","can","be","inserted","into","the","DOM","Parameters","--","--","--","--","--","tooltip",":","str","tooltip","caption","layout",":","InstanceDict","(","Layout",")","widget","layout"]
docstr: Adds a class to the top level element of the widget.
  
  Doesn't add the class if it already exists.
docstr_tok: ["Adds","a","class","to","the","top","level","element","of","the","widget",".","Does","n't","add","the","class","if","it","already","exists","."]
code: def add_class(self, className):
      """
      Adds a class to the top level element of the widget.
  
      Doesn't add the class if it already exists.
      """
      if className not in self._dom_classes:
          self._dom_classes = list(self._dom_classes) + [className]
      return self
  
file_path: catboost/contrib/python/ipywidgets/py3/ipywidgets/widgets/domwidget.py
imports: from traitlets import Bool, Unicode
  from .widget import Widget, widget_serialization
  from .trait_types import InstanceDict, TypedTuple
  from .widget_layout import Layout
  from .widget_style import Style
label_desc: Use image node_id 1 for calling the DOMWidget obj's underlying member method code with example usage: obj.add_class(className) and returns: self