code: def test_frame_vad_construct_pyannote_object_per_file(
      self, test_data_dir
  ):
      rttm_file, speech_segments = get_simple_rttm_without_overlap(
          test_data_dir + "/test7.rttm"
      )
      # test for rttm input
      ref, hyp = frame_vad_construct_pyannote_object_per_file(
          rttm_file, rttm_file
      )
      pyannote_object_gt = Annotation()
      pyannote_object_gt[Segment(0.0, 2.0)] = "speech"
      assert ref == hyp == pyannote_object_gt
  
      # test for list input
      speech_segments = load_speech_segments_from_rttm(rttm_file)
      frame_labels = get_frame_labels(
          speech_segments, 0.02, 0.0, 3.0, as_str=False
      )
      speech_segments_new = convert_labels_to_speech_segments(
          frame_labels, 0.02
      )
      assert speech_segments_new == speech_segments
      ref, hyp = frame_vad_construct_pyannote_object_per_file(
          frame_labels, frame_labels, 0.02
      )
      assert ref == hyp == pyannote_object_gt
  
file_path: NeMo/tests/collections/asr/utils/test_vad_utils.py
imports: import numpy
  import pytest
  from pyannote.core import Annotation, Segment
  from nemo.collections.asr.parts.utils.vad_utils import align_labels_to_frames, convert_labels_to_speech_segments, frame_vad_construct_pyannote_object_per_file, get_frame_labels, get_nonspeech_segments, load_speech_overlap_segments_from_rttm, load_speech_segments_from_rttm, read_rttm_as_pyannote_object
label_desc: Use image node_id 8 for calling the TestVADUtils obj's underlying member method code with example usage: obj.test_frame_vad_construct_pyannote_object_per_file(test_data_dir) without return types