code: def __getitem__(self, key):
      if isinstance(key, tuple):
          # key is a tuple, return the kernpair
          return self._kerning[key]
      else:
          # return the metrics instead
          return self._chars[key]
  
imports: import re
label_desc: Use image node_id 18 for calling the AFM obj's underlying member method code with example usage: obj.__getitem__(key) and returns: self, self