def tensorhead(name, typ, sym, comm=0, matrix_behavior=0):
 sym = tensorsymmetry(*sym)
 S = TensorType(typ, sym)
 th = S(name, comm, matrix_behavior=matrix_behavior)
 return th

def tensorhead ( name , typ , sym , comm = 0 , matrix_behavior = 0 ) : sym = tensorsymmetry ( * sym ) S = TensorType ( typ , sym ) th = S ( name , comm , matrix_behavior = matrix_behavior ) return th
function generating tensorhead(s) .