code: def diagonalize_vector(vector):
      return DiagMatrix(vector).doit()
  
imports: from sympy.core.sympify import _sympify
  from sympy.matrices.expressions import MatrixExpr
  from sympy.core import S, Eq, Ge
  from sympy.core.mul import Mul
  from sympy.functions.special.tensor_functions import KroneckerDelta
label_desc: Use image node_id 1 for calling a global function with example usage: diagonalize_vector(vector) and returns: DiagMatrix