Submachines:

As Turing notes, a Universal Computing Machine must be able to emulate any other computing machine. To illustrate this concept, PyTuring implements submachines, also called contained-state methods. A submachine implements its own set of instructions and states but works off of the same tape as the master program. A submachine is defined with: