def create_random_sentence_pair(self, sample, np_rng):
    num_sentences = len(sample)
    assert (num_sentences > 1), 'make sure each sample has at least two sentences.'
    a_end = 1
    if (num_sentences >= 3):
        a_end = np_rng.randint(1, num_sentences)
    tokens_a = []
    for j in range(a_end):
        tokens_a.extend(sample[j])
    tokens_b = []
    for j in range(a_end, num_sentences):
        tokens_b.extend(sample[j])
    is_next_random = False
    if (np_rng.random() < 0.5):
        is_next_random = True
        (tokens_a, tokens_b) = (tokens_b, tokens_a)
    return (tokens_a, tokens_b, is_next_random)
def create_random_sentence_pair(self, sample, np_rng):
    num_sentences = len(sample)
    assert (num_sentences > 1), 'make sure each sample has at least two sentences.'
    a_end = 1
    if (num_sentences >= 3):
        a_end = np_rng.randint(1, num_sentences)
    tokens_a = []
    for j in range(a_end):
        tokens_a.extend(sample[j])
    tokens_b = []
    for j in range(a_end, num_sentences):
        tokens_b.extend(sample[j])
    is_next_random = False
    if (np_rng.random() < 0.5):
        is_next_random = True
        (tokens_a, tokens_b) = (tokens_b, tokens_a)
    return (tokens_a, tokens_b, is_next_random)