class_docstr: Extended dictionary accessible with dot notation.
  
  >>> ad = AttributeDict({'key1': 1, 'key2': 'abc'})
  >>> ad.key1
  1
  >>> ad.update({'my-key': 3.14})
  >>> ad.update(new_key=42)
  >>> ad.key1 = 2
  >>> ad
  "key1":    2
  "key2":    abc
  "my-key":  3.14
  "new_key": 42
class_docstr_tok: ["Extended","dictionary","accessible","with","dot","notation",".",">",">",">","ad","=","AttributeDict","(","{","'key1","'",":","1",",","'key2","'",":","'abc","'","}",")",">",">",">","ad.key1","1",">",">",">","ad.update","(","{","'my-key","'",":","3.14","}",")",">",">",">","ad.update","(","new_key=42",")",">",">",">","ad.key1","=","2",">",">",">","ad","''","key1","''",":","2","''","key2","''",":","abc","''","my-key","''",":","3.14","''","new_key","''",":","42"]
code: def __repr__(self) -> str:
      if not len(self):
          return ""
      max_key_length = max(len(str(k)) for k in self)
      tmp_name = "{:" + str(max_key_length + 3) + "s} {}"
      rows = [
          tmp_name.format(f'"{n}":', self[n])
          for n in sorted(self.keys())
      ]
      return "\n".join(rows)
  
imports: from typing import Any, Dict, Optional
label_desc: Use image node_id 3 for calling the AttributeDict obj's underlying member method code with example usage: obj.__repr__() and returns: str, str