code: def cp_vonneumann_entropy(tensor):
      """Returns the von Neumann entropy of a density matrix (square matrix) in CP tensor.
  
      Parameters
      ----------
      tensor : (CP tensor)
          Data structure
  
      Returns
      -------
      cp_von_neumann_entropy : order-0 tensor
      """
      eig_vals = tl.cp_normalize(tensor).weights
      eps = tl.eps(eig_vals.dtype)
      eig_vals = eig_vals[eig_vals > eps]
  
      return -T.sum(T.log2(eig_vals) * eig_vals)
  
imports: import math
  import tensorly
  from ..None import backend
  from ..tt_tensor import tt_to_tensor
label_desc: Use image node_id 3 for calling a global function with example usage: cp_vonneumann_entropy(tensor) and returns: unknown