class_docstr: Class for storing events in a polyphonic sequence.
class_docstr_tok: ["Class","for","storing","events","in","a","polyphonic","sequence","."]
code: def __init__(self, event_type, pitch):
      if not (
          PolyphonicEvent.START
          <= event_type
          <= PolyphonicEvent.CONTINUED_NOTE
      ):
          raise ValueError("Invalid event type: %s" % event_type)
      if not (
          pitch is None or MIN_MIDI_PITCH <= pitch <= MAX_MIDI_PITCH
      ):
          raise ValueError("Invalid pitch: %s" % pitch)
  
      self.event_type = event_type
      self.pitch = pitch
  
imports: from __future__ import division
  import collections
  import copy
  from magenta.pipelines import statistics
  from note_seq import constants
  from note_seq import events_lib
  from note_seq import sequences_lib
  from note_seq.protobuf import music_pb2
  from six.moves import range
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new PolyphonicEvent object from inherited base classes: object with example: obj = PolyphonicEvent(event_type, pitch)