<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def encoded(self):
 """ Returns an encoded form of the query """

        if not self._encoded:
            self._encoded = self._encode()

        if self._base_str:
            return '&'.join((self._base_str, self._encoded))

        else:
            return self._encoded