code: def __test_duration(jam_orig, jam_shifted, orig_duration):
      # Verify the duration of last delayed annotation is in valid range
      # Verify the total duration hasn't changed
      assert (
          librosa.get_duration(**jam_shifted.sandbox.muda["_audio"])
      ) == orig_duration
  
      shifted_data = jam_shifted.search(namespace="chord")[0].data
      # the expected duration of last annotation = Duration - Onset of last annotation
      ref_duration = (
          orig_duration - shifted_data[-1][0]
      )  # [-1][0] indicates the 'time' of last observation
      # deformed duration:
      derformed_duration = shifted_data[-1][
          1
      ]  # [-1][0] indicates the 'duration' of last observation
      isclose_(ref_duration, derformed_duration, rtol=1e-5, atol=1e-1)
  
imports: from copy import deepcopy
  import re
  import six
  import numpy
  import soundfile
  import jams
  import librosa
  import muda
  import pytest
  import scipy
  from contextlib import contextmanager
label_desc: Use image node_id 36 for calling a global function with example usage: __test_duration(jam_orig, jam_shifted, orig_duration) without return types