class_docstr: Outputs multiple datasets.
  
  This Pipeline will take a single input feed and randomly partition the inputs
  into multiple output datasets. The probabilities of an input landing in each
  dataset are given by `partition_probabilities`. Use this Pipeline to partition
  previous Pipeline outputs into training and test sets, or training, eval, and
  test sets.
code: def __init__(self, type_, partition_names, partition_probabilities):
      super(RandomPartition, self).__init__(
          type_, dict((name, type_) for name in partition_names)
      )
      if len(partition_probabilities) != len(partition_names) - 1:
          raise ValueError(
              "len(partition_probabilities) != "
              "len(partition_names) - 1. "
              "Last probability is implicity."
          )
      self.partition_names = partition_names
      self.cumulative_density = np.cumsum(
          partition_probabilities
      ).tolist()
      self.rand_func = random.random
  
file_path: magenta/magenta/pipelines/pipelines_common.py
imports: import numbers
  import random
  from magenta.pipelines import pipeline
  from magenta.pipelines import statistics
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new RandomPartition object from inherited base classes: pipeline with example: obj = RandomPartition(type_, partition_names, partition_probabilities)