<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def generate_plaintext_random(plain_vocab, distribution, train_samples, length):
 """Generates samples of text from the provided vocabulary. Args: plain_vocab: vocabulary. distribution: distribution. train_samples: samples for training. length: length. Returns: train_indices (np.array of Integers):
 random integers for training. shape = [num_samples, length] test_indices (np.array of Integers):
 random integers for testing. shape = [num_samples, length] plain_vocab (list of Integers):
 unique vocabularies. """

  if distribution is not None:
    assert len(distribution) == len(plain_vocab)

  train_indices = np.random.choice(
      range(len(plain_vocab)), (train_samples, length), p=distribution)

  return train_indices