code: def thirdoct(fs, nfft, num_bands, min_freq):
      """Returns the 1/3 octave band matrix.
  
      Arguments
      ---------
      fs : int
          Sampling rate.
      nfft : int
          FFT size.
      num_bands : int
          Number of 1/3 octave bands.
      min_freq : int
          Center frequency of the lowest 1/3 octave band.
  
      Returns
      -------
      obm : tensor
          Octave Band Matrix.
      """
  
      f = torch.linspace(0, fs, nfft + 1)
      f = f[: int(nfft / 2) + 1]
      k = torch.from_numpy(np.array(range(num_bands)).astype(float))
      cf = torch.pow(2.0 ** (1.0 / 3), k) * min_freq
      freq_low = min_freq * torch.pow(2.0, (2 * k - 1) / 6)
      freq_high = min_freq * torch.pow(2.0, (2 * k + 1) / 6)
      obm = torch.zeros(num_bands, len(f))  # a verifier
  
      for i in range(len(cf)):
          # Match 1/3 oct band freq with fft frequency bin
          f_bin = torch.argmin(torch.square(f - freq_low[i]))
          freq_low[i] = f[f_bin]
          fl_ii = f_bin
          f_bin = torch.argmin(torch.square(f - freq_high[i]))
          freq_high[i] = f[f_bin]
          fh_ii = f_bin
          # Assign to the octave band matrix
          obm[i, fl_ii:fh_ii] = 1
      return obm
  
imports: import torch
  import torchaudio
  import numpy
  from speechbrain.utils.torch_audio_backend import check_torchaudio_backend
label_desc: Use image node_id 1 for calling a global function with example usage: thirdoct(fs, nfft, num_bands, min_freq) and returns: obm