docstr: Test conversion of a RIR from list of lists to multichannel array.
          
docstr_tok: ["Test","conversion","of","a","RIR","from","list","of","lists","to","multichannel","array","."]
code: def test_convert_rir_to_mc(self, num_mics: int, num_sources: int):
      """Test conversion of a RIR from list of lists to multichannel array."""
      len_range = [50, 1000]
      random = default_rng()
  
      rir = []
      rir_len = []
  
      # Golden reference
      for n_mic in range(num_mics):
          this_rir = []
          this_len = []
          for n_source in range(num_sources):
              random_len = np.random.randint(
                  low=len_range[0], high=len_range[1]
              )
              this_rir.append(np.random.rand(random_len))
              this_len.append(random_len)
          rir.append(this_rir)
          rir_len.append(this_len)
  
      # UUT
      mc_rir = convert_rir_to_multichannel(rir)
  
      # Compare
      for n_source in range(num_sources):
          for n_mic in range(num_mics):
              # check RIR
              diff_len = rir_len[n_mic][n_source]
              diff = (
                  mc_rir[n_source][:diff_len, n_mic]
                  - rir[n_mic][n_source]
              )
              assert np.all(
                  diff == 0.0
              ), f"Original RIR not matching: source={n_source}, channel={n_mic}"
  
              # check padding
              pad = mc_rir[n_source][diff_len:, n_mic]
              assert np.all(
                  pad == 0.0
              ), f"Original RIR not matching: source={n_source}, channel={n_mic}"
  
file_path: NeMo/tests/collections/asr/test_asr_data_simulation.py
imports: import os
  import tempfile
  from typing import List, Type, Union
  import numpy
  import pytest
  from numpy.random import default_rng
  from nemo.collections.asr.data.data_simulation import ArrayGeometry, check_angle, convert_placement_to_range, convert_rir_to_multichannel, simulate_room_mix, wrap_to_180
  from nemo.collections.asr.parts.preprocessing.segment import AudioSegment
label_desc: Use image node_id 4 for calling the TestDataSimulationUtils obj's underlying member method code with example usage: obj.test_convert_rir_to_mc(num_mics, num_sources) without return types