# Path: note_seq/encoder_decoder.py
# DEFAULT_STEPS_PER_BAR = constants.DEFAULT_STEPS_PER_BAR
# DEFAULT_LOOKBACK_DISTANCES = [DEFAULT_STEPS_PER_BAR, DEFAULT_STEPS_PER_BAR * 2]
# class OneHotEncoding(object):
# class EventSequenceEncoderDecoder(object):
# class OneHotEventSequenceEncoderDecoder(EventSequenceEncoderDecoder):
# class OneHotIndexEventSequenceEncoderDecoder(OneHotEventSequenceEncoderDecoder):
# class LookbackEventSequenceEncoderDecoder(EventSequenceEncoderDecoder):
# class ConditionalEventSequenceEncoderDecoder(object):
# class OptionalEventSequenceEncoder(EventSequenceEncoderDecoder):
# class MultipleEventSequenceEncoder(EventSequenceEncoderDecoder):
#   def num_classes(self):
#   def default_event(self):
#   def encode_event(self, event):
#   def decode_event(self, index):
#   def event_to_num_steps(self, unused_event):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
#   def labels_to_num_steps(self, labels):
#   def encode(self, events):
#   def get_inputs_batch(self, event_sequences, full_length=False):
#   def extend_event_sequences(self, event_sequences, softmax):
#   def evaluate_log_likelihood(self, event_sequences, softmax):
#   def __init__(self, one_hot_encoding):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
#   def labels_to_num_steps(self, labels):
#   def input_size(self):
#   def input_depth(self):
#   def events_to_input(self, events, position):
#   def __init__(self, one_hot_encoding, lookback_distances=None,
#                binary_counter_bits=5):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
#   def labels_to_num_steps(self, labels):
#   def __init__(self, control_encoder_decoder, target_encoder_decoder):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, control_events, target_events, position):
#   def events_to_label(self, target_events, position):
#   def class_index_to_event(self, class_index, target_events):
#   def labels_to_num_steps(self, labels):
#   def encode(self, control_events, target_events):
#   def get_inputs_batch(self, control_event_sequences, target_event_sequences,
#                        full_length=False):
#   def extend_event_sequences(self, target_event_sequences, softmax):
#   def evaluate_log_likelihood(self, target_event_sequences, softmax):
#   def __init__(self, encoder):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
#   def __init__(self, encoders, encode_single_sequence=False):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
# 
# Path: note_seq/protobuf/compare.py
# def assertProtoEqual(self, a, b, check_initialized=True,  # pylint: disable=invalid-name
#                      normalize_numbers=False, msg=None):
# def NormalizeNumberFields(pb):
# def _IsMap(value):
# def _IsRepeatedContainer(value):
# def ProtoEq(a, b):
#   def Format(pb):
#   def assertProtoEqual(self, *args, **kwargs):
# class ProtoAssertions(object):


import os
from absl.testing import absltest
from note_seq import encoder_decoder
from note_seq.protobuf import compare
from note_seq.protobuf import music_pb2
from google.protobuf import descriptor_pool
from google.protobuf import text_format
    return event

  def event_to_num_steps(self, event):
    if self._num_steps is not None:
      return self._num_steps[event]
    else:
      return 1


def parse_test_proto(proto_type, proto_string):
  instance = proto_type()
  text_format.Parse(proto_string, instance)
  return instance


def get_testdata_dir():
  dir_path = 'note_seq/testdata'
  return os.path.join(absltest.get_default_test_srcdir(), dir_path)


class ProtoTestCase(absltest.TestCase):
  """Adds assertProtoEquals from tf.test.TestCase."""

  def setUp(self):
    self.maxDiff = None  # pylint:disable=invalid-name
    self.steps_per_quarter = 4
    self.note_sequence = parse_test_proto(
        music_pb2.NoteSequence, """
        time_signatures: {
          numerator: 4

# Path: note_seq/encoder_decoder.py
# DEFAULT_STEPS_PER_BAR = constants.DEFAULT_STEPS_PER_BAR
# DEFAULT_LOOKBACK_DISTANCES = [DEFAULT_STEPS_PER_BAR, DEFAULT_STEPS_PER_BAR * 2]
# class OneHotEncoding(object):
# class EventSequenceEncoderDecoder(object):
# class OneHotEventSequenceEncoderDecoder(EventSequenceEncoderDecoder):
# class OneHotIndexEventSequenceEncoderDecoder(OneHotEventSequenceEncoderDecoder):
# class LookbackEventSequenceEncoderDecoder(EventSequenceEncoderDecoder):
# class ConditionalEventSequenceEncoderDecoder(object):
# class OptionalEventSequenceEncoder(EventSequenceEncoderDecoder):
# class MultipleEventSequenceEncoder(EventSequenceEncoderDecoder):
#   def num_classes(self):
#   def default_event(self):
#   def encode_event(self, event):
#   def decode_event(self, index):
#   def event_to_num_steps(self, unused_event):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
#   def labels_to_num_steps(self, labels):
#   def encode(self, events):
#   def get_inputs_batch(self, event_sequences, full_length=False):
#   def extend_event_sequences(self, event_sequences, softmax):
#   def evaluate_log_likelihood(self, event_sequences, softmax):
#   def __init__(self, one_hot_encoding):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
#   def labels_to_num_steps(self, labels):
#   def input_size(self):
#   def input_depth(self):
#   def events_to_input(self, events, position):
#   def __init__(self, one_hot_encoding, lookback_distances=None,
#                binary_counter_bits=5):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
#   def labels_to_num_steps(self, labels):
#   def __init__(self, control_encoder_decoder, target_encoder_decoder):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, control_events, target_events, position):
#   def events_to_label(self, target_events, position):
#   def class_index_to_event(self, class_index, target_events):
#   def labels_to_num_steps(self, labels):
#   def encode(self, control_events, target_events):
#   def get_inputs_batch(self, control_event_sequences, target_event_sequences,
#                        full_length=False):
#   def extend_event_sequences(self, target_event_sequences, softmax):
#   def evaluate_log_likelihood(self, target_event_sequences, softmax):
#   def __init__(self, encoder):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
#   def __init__(self, encoders, encode_single_sequence=False):
#   def input_size(self):
#   def num_classes(self):
#   def default_event_label(self):
#   def events_to_input(self, events, position):
#   def events_to_label(self, events, position):
#   def class_index_to_event(self, class_index, events):
# 
# Path: note_seq/protobuf/compare.py
# def assertProtoEqual(self, a, b, check_initialized=True,  # pylint: disable=invalid-name
#                      normalize_numbers=False, msg=None):
# def NormalizeNumberFields(pb):
# def _IsMap(value):
# def _IsRepeatedContainer(value):
# def ProtoEq(a, b):
#   def Format(pb):
#   def assertProtoEqual(self, *args, **kwargs):
# class ProtoAssertions(object):


# Path: note_seq/testing_lib.py
import os
from absl.testing import absltest
from note_seq import encoder_decoder
from note_seq.protobuf import compare
from note_seq.protobuf import music_pb2
from google.protobuf import descriptor_pool
from google.protobuf import text_format

    return event

  def event_to_num_steps(self, event):
    if self._num_steps is not None:
      return self._num_steps[event]
    else:
      return 1


def parse_test_proto(proto_type, proto_string):
  instance = proto_type()
  text_format.Parse(proto_string, instance)
  return instance


def get_testdata_dir():
  dir_path = 'note_seq/testdata'
  return os.path.join(absltest.get_default_test_srcdir(), dir_path)


class ProtoTestCase(absltest.TestCase):
  """Adds assertProtoEquals from tf.test.TestCase."""

  def setUp(self):
    self.maxDiff = None  # pylint:disable=invalid-name
    self.steps_per_quarter = 4
    self.note_sequence = parse_test_proto(
        music_pb2.NoteSequence, """
        time_signatures: {
          numerator: 4

          denominator: 4