class_docstr: One-hot encoding for polyphonic events.
code: def decode_event(self, index):
      if index < len(EVENT_CLASSES_WITHOUT_PITCH):
          return PolyphonicEvent(
              event_type=EVENT_CLASSES_WITHOUT_PITCH[index], pitch=0
          )
  
      pitched_index = index - len(EVENT_CLASSES_WITHOUT_PITCH)
      if pitched_index < len(EVENT_CLASSES_WITH_PITCH) * PITCH_CLASSES:
          event_type = len(EVENT_CLASSES_WITHOUT_PITCH) + (
              pitched_index // PITCH_CLASSES
          )
          pitch = pitched_index % PITCH_CLASSES
          return PolyphonicEvent(event_type=event_type, pitch=pitch)
  
      raise ValueError("Unknown event index: %s" % index)
  
file_path: magenta/magenta/models/polyphony_rnn/polyphony_encoder_decoder.py
imports: from __future__ import division
  from magenta.models.polyphony_rnn import polyphony_lib
  from magenta.models.polyphony_rnn.polyphony_lib import PolyphonicEvent
  from note_seq import encoder_decoder
label_desc: Use image node_id 4 for calling the PolyphonyOneHotEncoding obj's underlying member method code with example usage: obj.decode_event(index) and returns: PolyphonicEvent, PolyphonicEvent