def __getattr__(self, name):
        # Prevent infinite loops
        if name == 'application':
            raise AttributeError
        # These always belong to the parent (the unbound application)
        if name in ('delegate_function', 'properties'):
            return getattr(self.application, name)
        if name in self.properties.values():
            return getattr(self.application.brick, name)
        if name in self.properties:
            return getattr(self, self.properties[name])(self.brick)
        # First try the parent (i.e. class level), before trying the delegate
        try:
            return getattr(self.application, name)
        except AttributeError:
            if self.delegate_function:
                return getattr(getattr(self.brick,
                                       self.delegate_function)(),
                               name)
            raise
dataset/ETHPy150Open rizar/attention-lvcsr/libs/blocks/blocks/bricks/base.py/BoundApplication.__getattr__/original