<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def cursor(self):
 """Cache and return cursor_class instance"""

        if self._cursor is None:
            # pylint: disable=not-callable
            self._cursor = self.cursor_class(self, self.get_initial_elements())

        return self._cursor