class_docstr: Assemble, save, and render DOT source code, open result in viewer.
class_docstr_tok: ["Assemble",",","save",",","and","render","DOT","source","code",",","open","result","in","viewer","."]
docstr: Add a general or graph/node/edge attribute statement.
  
  Args:
      kw: Attributes target (``None`` or ``'graph'``, ``'node'``, ``'edge'``).
      attrs: Attributes to be set (must be strings, may be empty).
  
  See the :ref:`usage examples in the User Guide <attributes>`.
docstr_tok: ["Add","a","general","or","graph\/node\/edge","attribute","statement",".","Args",":","kw",":","Attributes","target","(","``","None","``","or","``","'graph","'","``",",","``","'node","'","``",",","``","'edge","'","``",")",".","attrs",":","Attributes","to","be","set","(","must","be","strings",",","may","be","empty",")",".","See","the",":","ref",":","`","usage","examples","in","the","User","Guide","<","attributes",">","`","."]
code: def attr(self, kw=None, _attributes=None, **attrs):
      """Add a general or graph/node/edge attribute statement.
  
      Args:
          kw: Attributes target (``None`` or ``'graph'``, ``'node'``, ``'edge'``).
          attrs: Attributes to be set (must be strings, may be empty).
  
      See the :ref:`usage examples in the User Guide <attributes>`.
      """
      if kw is not None and kw.lower() not in ("graph", "node", "edge"):
          raise ValueError(
              "attr statement must target graph, node, or edge: "
              "%r" % kw
          )
      if attrs or _attributes:
          if kw is None:
              a_list = self._a_list(None, attrs, _attributes)
              line = self._attr_plain % a_list
          else:
              attr_list = self._attr_list(None, attrs, _attributes)
              line = self._attr % (kw, attr_list)
          self.body.append(line)
  
imports: from .None import backend
  from .None import files
  from .None import lang
label_desc: Use image node_id 9 for calling the Dot obj's underlying member method code with example usage: obj.attr(kw, _attributes) without return types