Control Flow in Active Inference Systems—Part II: Tensor Networks as General Models of Control Flow