code: def get_property_func(key):
      
      def get_it(obj):
          try:
              return getattr(obj, key)
          except AttributeError:
              return obj.tags.get(key)
      return get_it
docs: Get the accessor function for an instance to look for `key`.
  
      Look for it as an attribute, and if that does not work, look to see if it
      is a tag.