code: def _step_to_value(step, num_steps, values):
      """Map step in performance to desired control signal value."""
      num_segments = len(values)
      index = min(step * num_segments // num_steps, num_segments - 1)
      return values[index]
  
file_path: magenta/magenta/models/performance_rnn/performance_sequence_generator.py
imports: from __future__ import division
  import ast
  import functools
  import math
  from magenta.models.performance_rnn import performance_model
  from magenta.models.shared import sequence_generator
  from magenta.pipelines import performance_pipeline
  import note_seq
  from note_seq import performance_controls
  import tensorflow.compat.v1
label_desc: Use image node_id 1 for calling a global function with example usage: _step_to_value(step, num_steps, values) and returns: values