'Generates a response sequence with the currently-selected generator.
Args:
input_sequence: The NoteSequence to use as a generation seed.
zero_time: The float time in seconds to treat as the start of the input.
response_start_time: The float time in seconds for the start of
generation.
response_end_time: The float time in seconds for the end of generation.
Returns:
The generated NoteSequence.'

def _generate(self, input_sequence, zero_time, response_start_time, response_end_time):

    response_start_time -= zero_time
    response_end_time -= zero_time
    generator_options = generator_pb2.GeneratorOptions()
    generator_options.input_sections.add(start_time=0, end_time=response_start_time)
    generator_options.generate_sections.add(start_time=response_start_time, end_time=response_end_time)
    generator_options.args['temperature'].float_value = self._temperature
    tf.logging.info("Generating    sequence    using    '%s'    generator.", self._sequence_generator.details.id)
    tf.logging.debug('Generator    Details:    %s', self._sequence_generator.details)
    tf.logging.debug('Bundle    Details:    %s', self._sequence_generator.bundle_details)
    tf.logging.debug('Generator    Options:    %s', generator_options)
    response_sequence = self._sequence_generator.generate(adjust_sequence_times(input_sequence, (- zero_time)), generator_options)
    response_sequence = magenta.music.trim_note_sequence(response_sequence, response_start_time, response_end_time)
    return adjust_sequence_times(response_sequence, zero_time)
