code: def getter(name, key=None):
    
  
    if not key:
      key = lambda x: x
  
    def wrapper(self):
      return key(getattr(self, name))
    wrapper.__name__ = wrapper.__qualname__ = name
    return property(wrapper)
docs: Creates a read-only property for the attribute name *name*. If a *key*
    function is provided, it can be used to post-process the value of the
    attribute.