code: def splice_examples(dataset, hparams, is_training):
      """Splice together several examples into a single example."""
      if (not is_training) or hparams.splice_n_examples == 0:
          return dataset
      else:
          dataset = dataset.padded_batch(
              hparams.splice_n_examples,
              padded_shapes=dataset.output_shapes,
          )
  
          def _splice(features, labels):
              """Splice together a batch of examples into a single example."""
              combine = functools.partial(
                  combine_tensor_batch,
                  lengths=features.length,
                  max_length=hparams.max_expected_train_example_len,
                  batch_size=hparams.splice_n_examples,
              )
  
              combined_features = FeatureTensors(
                  spec=combine(features.spec),
                  length=tf.reduce_sum(features.length),
                  sequence_id=tf.constant(0),
              )
              combined_labels = LabelTensors(
                  labels=combine(labels.labels),
                  label_weights=combine(labels.label_weights),
                  onsets=combine(labels.onsets),
                  offsets=combine(labels.offsets),
                  velocities=combine(labels.velocities),
                  note_sequence=tf.constant(0),
              )
              return combined_features, combined_labels
  
          combined_dataset = dataset.map(_splice)
          return combined_dataset
  
imports: import collections
  import functools
  import io
  import re
  import wave
  import zlib
  import librosa
  from magenta.models.onsets_frames_transcription import audio_transform
  from magenta.models.onsets_frames_transcription import constants
  from magenta.models.onsets_frames_transcription import drum_mappings
  from magenta.models.onsets_frames_transcription import melspec_input
  from note_seq import audio_io
  from note_seq import sequences_lib
  from note_seq.protobuf import music_pb2
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 28 for calling a global function with example usage: splice_examples(dataset, hparams, is_training) and returns: dataset, combined_dataset, combined_features,  combined_labels