code: def uem_timeline_from_file(uem_file, uniq_name=""):
      """
      Generate pyannote timeline segments for uem file
  
       <UEM> file format
       UNIQ_SPEAKER_ID CHANNEL START_TIME END_TIME
      """
      timeline = Timeline(uri=uniq_name)
      with open(uem_file, "r") as f:
          lines = f.readlines()
          for line in lines:
              line = line.strip()
              speaker_id, channel, start_time, end_time = line.split()
              timeline.add(Segment(float(start_time), float(end_time)))
  
      return timeline
  
file_path: NeMo/nemo/collections/asr/metrics/der.py
imports: import itertools
  from itertools import permutations
  from typing import Dict, List, Optional, Tuple
  import numpy
  import torch
  from pyannote.core import Segment, Timeline
  from pyannote.metrics.diarization import DiarizationErrorRate
  from nemo.collections.asr.metrics.wer import word_error_rate
  from nemo.collections.asr.parts.utils.optimization_utils import linear_sum_assignment
  from nemo.utils import logging
label_desc: Use image node_id 3 for calling a global function with example usage: uem_timeline_from_file(uem_file, uniq_name) and returns: timeline