code: def _safe_getattr(o):
      
      def getattribute(attr): # pragma: no cover
          if hasattr(o, "__acornext__") and o.__acornext__ is not None:
              return o.__acornext__.__getattribute__(attr)
          elif hasattr(o, "__acorn__") and o.__acorn__ is not None:
              #Some of the functions have the original function (when it was not
              #extended) in the __acorn__ attribute.
              return o.__acorn__.__getattribute__(attr)
          else:
              return getattr(o, attr)
      return getattribute
docs: Gets the attribute from the specified object, taking the acorn decoration
      into account.