docs: def close(self):
          '''Closes connection with the q service.'''
          if self._connection:
              self._connection_file.close()
              self._connection_file = None
              self._connection.close()
              self._connection = None