Reorganize functions in tensor and methods of _py_tensor_operators