code: def testRandomData(self):
      def calc_entropy(arr):
          arr /= np.sum(arr)
          return -np.sum(np.nan_to_num(np.log2(arr)) * arr)
  
      for _ in range(10):
          arr = np.array(
              [random.random() for i in range(100)], dtype=np.single
          )
          self.assertAlmostEqual(
              calc_entropy(arr), Entropy()(arr), precision=1e-5
          )
  
file_path: essentia/test/src/unittests/stats/test_entropy.py
imports: import os.path
  import random
  from essentia_test import *
  import numpy
  import math
label_desc: Use image node_id 4 for calling the TestEntropy obj's underlying member method code with example usage: obj.testRandomData() and returns: unknown