code: def visualize_multispeaker_data(
      input_dir: str, output_dir: str, num_samples: int = 10
  ) -> None:
      """
      Visualize a set of randomly sampled data in the input directory
  
      Args:
          input_dir (str): Path to the input directory
          output_dir (str): Path to the output directory
          num_samples (int): Number of samples to visualize
      """
      rttm_list = list(Path(input_dir).glob("*.rttm"))
      idx_list = np.random.permutation(len(rttm_list))[:num_samples]
      print(f"Visualizing {num_samples} random samples")
      for idx in idx_list:
          rttm_file = rttm_list[idx]
          audio_file = rttm_file.parent / Path(rttm_file.stem + ".wav")
          output_file = Path(output_dir) / Path(rttm_file.stem + ".png")
          plot_sample_from_rttm(
              audio_file=audio_file,
              rttm_file=rttm_file,
              save_path=str(output_file),
              show=False,
          )
      print(f"Sample plots saved at: {output_dir}")
  
file_path: NeMo/scripts/speaker_tasks/multispeaker_data_analysis.py
imports: import argparse
  import multiprocessing
  import shutil
  from collections import OrderedDict
  from pathlib import Path
  from pprint import pprint
  from typing import Dict
  import matplotlib.pyplot
  import numpy
  import seaborn
  import sox
  from scipy.stats import expon
  from tqdm import tqdm
  from nemo.collections.asr.parts.utils.vad_utils import get_nonspeech_segments, load_speech_overlap_segments_from_rttm, plot_sample_from_rttm
label_desc: Use image node_id 3 for calling a global function with example usage: visualize_multispeaker_data(input_dir, output_dir, num_samples) without return types