code: def entropy(p):
      p = prob_normalize(p)
      result = 0.0
      for x in range(p.shape[0]):
          for y in range(p.shape[1]):
              p_xy = p[x][y]
              if p_xy > 0.0:
                  result -= p_xy * np.log2(p_xy)
      return result
  
file_path: insightface/reconstruction/ostec/external/stylegan2/metrics/linear_separability.py
imports: from collections import defaultdict
  import numpy
  import sklearn.svm
  import tensorflow
  import dnnlib.tflib
  from metrics import metric_base
  from training import misc
label_desc: Use image node_id 3 for calling a global function with example usage: entropy(p) and returns: result