code: def close(self):
          
          try:
              if self.connection is None:
                  return
              while self.nextset():
                  pass
          finally:
              self.connection = None
              self._result = None
docs: Close the cursor. No further queries will be possible.