code: def get_pipeline(config, min_steps, max_steps, eval_ratio):
      """Returns the Pipeline instance which creates the RNN dataset.
  
      Args:
        config: An EventSequenceRnnConfig.
        min_steps: Minimum number of steps for an extracted sequence.
        max_steps: Maximum number of steps for an extracted sequence.
        eval_ratio: Fraction of input to set aside for evaluation set.
  
      Returns:
        A pipeline.Pipeline instance.
      """
      # Transpose up to a major third in either direction.
      # Because our current dataset is Bach chorales, transposing more than a major
      # third in either direction probably doesn't makes sense (e.g., because it is
      # likely to exceed normal singing range).
      transposition_range = range(-4, 5)
  
      partitioner = pipelines_common.RandomPartition(
          music_pb2.NoteSequence,
          ["eval_poly_tracks", "training_poly_tracks"],
          [eval_ratio],
      )
      dag = {partitioner: dag_pipeline.DagInput(music_pb2.NoteSequence)}
  
      for mode in ["eval", "training"]:
          time_change_splitter = (
              note_sequence_pipelines.TimeChangeSplitter(
                  name="TimeChangeSplitter_" + mode
              )
          )
          quantizer = note_sequence_pipelines.Quantizer(
              steps_per_quarter=config.steps_per_quarter,
              name="Quantizer_" + mode,
          )
          transposition_pipeline = (
              note_sequence_pipelines.TranspositionPipeline(
                  transposition_range,
                  name="TranspositionPipeline_" + mode,
              )
          )
          poly_extractor = PolyphonicSequenceExtractor(
              min_steps=min_steps,
              max_steps=max_steps,
              name="PolyExtractor_" + mode,
          )
          encoder_pipeline = event_sequence_pipeline.EncoderPipeline(
              polyphony_lib.PolyphonicSequence,
              config.encoder_decoder,
              name="EncoderPipeline_" + mode,
          )
  
          dag[time_change_splitter] = partitioner[mode + "_poly_tracks"]
          dag[quantizer] = time_change_splitter
          dag[transposition_pipeline] = quantizer
          dag[poly_extractor] = transposition_pipeline
          dag[encoder_pipeline] = poly_extractor
          dag[
              dag_pipeline.DagOutput(mode + "_poly_tracks")
          ] = encoder_pipeline
  
      return dag_pipeline.DAGPipeline(dag)
  
file_path: magenta/magenta/models/polyphony_rnn/polyphony_rnn_pipeline.py
imports: from magenta.models.polyphony_rnn import polyphony_lib
  from magenta.pipelines import dag_pipeline
  from magenta.pipelines import event_sequence_pipeline
  from magenta.pipelines import note_sequence_pipelines
  from magenta.pipelines import pipeline
  from magenta.pipelines import pipelines_common
  from note_seq.protobuf import music_pb2
label_desc: Use image node_id 1 for calling a global function with example usage: get_pipeline(config, min_steps, max_steps, eval_ratio) and returns: dag_pipeline