code: def test_plimit_factorizations(sort, primes):
      intervals = librosa.plimit_intervals(
          primes=primes,
          bins_per_octave=20,
          sort=sort,
          return_factors=False,
      )
      factors = librosa.plimit_intervals(
          primes=primes,
          bins_per_octave=20,
          sort=sort,
          return_factors=True,
      )
  
      assert len(intervals) == len(factors)
  
      for ival, facts in zip(intervals, factors):
          value = 0.0
          for prime in facts:
              value += facts[prime] * np.log2(prime)
  
          assert np.isclose(ival, np.power(2, value))
  
file_path: librosa/tests/test_intervals.py
imports: import os
  import sys
  import warnings
  import numpy
  import pytest
  import librosa
label_desc: Use image node_id 8 for calling a global function with example usage: test_plimit_factorizations(sort, primes) without return types