<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def result(self, timeout=None):
 """Enters polling loop on OperationsClient.get_operation, and once Operation.done is true, then returns Operation.response if successful or throws GaxError if not successful. This method will wait up to timeout seconds. If the call hasn't completed in timeout seconds, then a RetryError will be raised. timeout can be an int or float. If timeout is not specified or None, there is no limit to the wait time. """

        # Check exceptional case: raise if no response
        if not self._poll(timeout).HasField('response'):
            raise GaxError(self._operation.error.message)

        # Return expected result
        return _from_any(self._result_type, self._operation.response)