code: def attr_list(
      label: typing.Optional[str] = None, kwargs=None, attributes=None
  ) -> str:
      """Return assembled DOT attribute list string.
  
      Sorts ``kwargs`` and ``attributes`` if they are plain dicts (to avoid
      unpredictable order from hash randomization in Python 3 versions).
  
      >>> attr_list()
      ''
  
      >>> attr_list('spam spam', kwargs={'eggs': 'eggs', 'ham': 'ham ham'})
      ' [label="spam spam" eggs=eggs ham="ham ham"]'
  
      >>> attr_list(kwargs={'spam': None, 'eggs': ''})
      ' [eggs=""]'
      """
      content = a_list(label, kwargs, attributes)
      if not content:
          return ""
      return f" [{content}]"
  
file_path: catboost/contrib/python/graphviz/py3/graphviz/lang.py
imports: import functools
  import re
  import typing
  from .None import tools
label_desc: Use image node_id 4 for calling a global function with example usage: attr_list(label, kwargs, attributes) and returns: str, content, str, str