Return a possible next word after ``word1`` and ``word2``, or ``None``
        if there's no possibility.
190306
def _get(self, word1, word2):
        
        key = self._WSEP.join([self._sanitize(word1), self._sanitize(word2)])
        key = key.lower()
        if key not in self._db:
            return

        return sample(self._db[key], 1)[0]
603540
def next(self):
        
        while True:
            x, y = next(self.scan)
            if self.predicate is not None and not self.predicate(x,y):
                if self.abort: raise StopIteration("Boundary crossed!")
            elif (x < self.minx or
                x > self.maxx or
                y < self.miny or
                y > self.maxy):
                if self.abort: raise StopIteration("Boundary crossed!")
            else:
                return x, y
4464
def next(self):
        

        try:
            self._fetch()
            pkt = self.pkt_queue.popleft()
            try:
                self._infer_acked(pkt)
            except:
                pass
            try:
                self._infer_retry(pkt)
            except:
                pass

            return pkt
        except IndexError:
            raise StopIteration()
220892
def next(self):
        
        if self._cur_item is not None:
            res = self._cur_item
            self._cur_item = None
            return res
        
        return next(self._ex_context)
1077504
def find_one(self, **kwargs):
        
        kwargs["_limit"] = 1
        iterator = self.find(**kwargs)
        try:
            return next(iterator)
        except StopIteration:
            return None
1297537
def forward_word(event):
    
    buff = event.current_buffer
    pos = buff.document.find_next_word_ending(count=event.arg)

    if pos:
        buff.cursor_position += pos
410276
def next(self):
        
        if self._has_finished:
            raise StopIteration

        if not len(self._buffer):
                    
            results = self.fetch_next_block()
            self._buffer.extend(results)
            
        if not len(self._buffer):
            raise StopIteration
            
        return self._buffer.popleft()
705414
def _get_next(self, history):
        """"""
        orig_history = history
        if not history:
            return helper.START
        history = history[-(self._n-1):]
        while history and not self._T.get(history):
            history = history[1:]
        kv = [(k, v) for k, v in self._T.items(history)
              if not (k in reserved_words or k == history)]
        total = sum(v for k, v in kv)
        while total == 0 and len(history) > 0:
            history = history[1:]
            kv = [(k, v) for k, v in self._T.items(history)
                  if not (k in reserved_words or k == history)]
            total = sum(v for k, v in kv)
        assert total > 0, "Sorry there is no n-gram with {!r}".format(orig_history)
        d = defaultdict(float)
        total = self._T.get(history)
        for k, v in kv:
            k = k[len(history):]
            d[k] += (v+1)/(total + N_VALID_CHARS-1)
        return d
514501
def next(self):
        """"""
        rv = self.current
        self.pos = (self.pos + 1) % len(self.items)
        return rv
148932
def find_next(self):
        """"""
        state = self.find(changed=False, forward=True, rehighlight=False,
                          multiline_replace_check=False)
        self.editor.setFocus()
        self.search_text.add_current_text()
        return state
587417
def next (self):
        
        header, packet = self.read()

        if packet is None:
            raise StopIteration

        return header, packet
456253
def Next(self):
        
        try:
            self.key, self.value = next(self.current)
        except StopIteration:

            if self.current != self.second:
                self.current = self.second
                return self.Next()

            return False

        return True
209902
def get_closest(word, possibilities, cutoff=0.6, fallback_to_first=True):
    """"""
    possibilities = list(possibilities)
    try:
        return difflib_get_close_matches(word, possibilities, 1, cutoff)[0]
    except IndexError:
        if fallback_to_first:
            return possibilities[0]
691366
def next(self):
        """"""
        if self.tokens:
            other = self.copy()
            tok = other.tokens.pop()
            other.tokens.append(tok.next())
            return other
        else:
            return Version.inf
1279119
def next(self):
        
        while True:
            x, y = next(self.scan)
            self.index += 1
            if (self.index < self.start): continue
            if (self.index > self.stop): raise StopIteration("skip stopping")
            if ((self.index-self.start) % self.step != 0): continue
            return x, y
1131457
def find_next(start, stop, i2hits):
    
    if start not in i2hits and stop in i2hits:
        index = stop
    elif stop not in i2hits and start in i2hits:
        index = start
    elif start not in i2hits and stop not in i2hits:
        index = choice([start, stop])
        i2hits[index] = [[False]]
    else:
        A, B = i2hits[start][0], i2hits[stop][0]
        if B[10] <= A[10]:
            index = stop
        else:
            index = start
    if index == start:
        nstart = start - 1
        nstop = stop
    else:
        nstop = stop + 1
        nstart = start
    match = i2hits[index][0]
    rp = match[-1]
    return index, nstart, nstop, rp, match
569301
def next(self):
        """"""
        if self.curr_idx == len(self.idx):
            raise StopIteration
        #i = batches index, j = starting record
        i, j = self.idx[self.curr_idx] 
        self.curr_idx += 1

        indices = self.ndindex[i][j:j + self.batch_size]
        sentences = self.ndsent[i][j:j + self.batch_size]
        characters = self.ndchar[i][j:j + self.batch_size]
        label = self.ndlabel[i][j:j + self.batch_size]

        return DataBatch([sentences, characters], [label], pad=0, index = indices, bucket_key=self.buckets[i],
                         provide_data=[DataDesc(name=self.data_names[0], shape=sentences.shape, layout=self.layout),
                                       DataDesc(name=self.data_names[1], shape=characters.shape, layout=self.layout)],
                         provide_label=[DataDesc(name=self.label_name, shape=label.shape, layout=self.layout)])