code: def pca(pool, namespace=""):
      llspace = "lowlevel."
      if namespace:
          llspace = namespace + ".lowlevel."
      sccoeffs = pool[llspace + "sccoeffs"]
      scvalleys = pool[llspace + "scvalleys"]
      numFrames = len(sccoeffs)
      poolSc = Pool()
      merged = essentia.zeros(2 * len(sccoeffs[0]))
      for frame in xrange(numFrames):
          j = 0
          for i in xrange(len(sccoeffs[frame])):
              merged[j] = sccoeffs[frame][i]
              merged[j + 1] = scvalleys[frame][i]
              j += 2
          poolSc.add("contrast", merged)
  
      poolTransformed = standard.PCA(
          namespaceIn="contrast", namespaceOut="contrast"
      )(poolSc)
  
      contrast = poolTransformed["contrast"]
  
      pool.set(
          llspace + "spectral_contrast.mean", mean(contrast, axis=0)
      )
      pool.set(llspace + "spectral_contrast.var", var(contrast, axis=0))
  
      pool.remove(llspace + "sccoeffs")
      pool.remove(llspace + "scvalleys")
  
imports: import essentia
  import essentia.standard
  import essentia.streaming
  from essentia import Pool
  from numpy import mean, var
label_desc: Use image node_id 1 for calling a global function with example usage: pca(pool, namespace) without return types