code: def Tr(M):
      return M.trace()
  
file_path: sympy/examples/advanced/qft.py
imports: from sympy import Basic, Symbol, Matrix, ones, sqrt, pprint, Eq, sympify
  from sympy.physics import msigma, mgamma
label_desc: Use image node_id 4 for calling a global function with example usage: Tr(M) and returns: M