<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def driver_needed(func):
 """ Decorator for WhatsappObjectWithId methods that need to communicate with the browser It ensures that the object receives a driver instance at construction :param func: WhatsappObjectWithId method :return: Wrapped method """


    def wrapped(self, *args):
        if not self.driver:
            raise AttributeError("No driver passed to object")

        return func(self, *args)

    return wrapped