def __getattr__(self, name):
        """Retrieves attribute or method :py:`name` of the unflipped interface.

        Performs :py:`getattr(unflipped, name)`, with the following caveats:

        1. If :py:`name` refers to a signature member, the returned interface object is flipped.
        2. If :py:`name` refers to a property getter or a method, its :py:`self` argument receives
           the *flipped* interface. A class method's :py:`cls` argument receives the class of
           the *unflipped* interface, as usual.
        """
        if (name in self.__unflipped.signature.members and
                self.__unflipped.signature.members[name].is_signature):
            return flipped(getattr(self.__unflipped, name))
        else:
            try: # descriptor first
                return _gettypeattr(self.__unflipped, name).__get__(self, type(self.__unflipped))
            except AttributeError:
                return getattr(self.__unflipped, name)
Retrieves attribute or method :py:`name` of the unflipped interface.

        Performs :py:`getattr(unflipped, name)`, with the following caveats:

        1. If :py:`name` refers to a signature member, the returned interface object is flipped.
        2. If :py:`name` refers to a property getter or a method, its :py:`self` argument receives
           the *flipped* interface. A class method's :py:`cls` argument receives the class of
           the *unflipped* interface, as usual.
        
amaranth/lib/wiring.py