def __send_message(self, operation):
        """Send a getmore message and handle the response.
        """
        def kill():
            self.__killed = True
            self.__end_session(True)

        client = self.__collection.database.client
        try:
            response = client._run_operation_with_response(
                operation, self._unpack_response, address=self.__address)
        except OperationFailure:
            kill()
            raise
        except NotMasterError:
            # Don't send kill cursors to another server after a "not master"
            # error. It's completely pointless.
            kill()
            raise
        except ConnectionFailure:
            # Don't try to send kill cursors on another socket
            # or to another server. It can cause a _pinValue
            # assertion on some server releases if we get here
            # due to a socket timeout.
            kill()
            raise
        except Exception:
            # Close the cursor
            self.__die()
            raise

        from_command = response.from_command
        reply = response.data
        docs = response.docs

        if from_command:
            cursor = docs[0]['cursor']
            documents = cursor['nextBatch']
            self.__postbatchresumetoken = cursor.get('postBatchResumeToken')
            self.__id = cursor['id']
        else:
            documents = docs
            self.__id = reply.cursor_id

        if self.__id == 0:
            kill()
        self.__data = deque(documents)
Send a getmore message and handle the response.
        
stackoverflow/venv/lib/python3.6/site-packages/pymongo/command_cursor.py