I have been running a library made for Python in Matlab for quite sometimes now using command "pyversion (*insert location of the Python interpreter here*)" e.g - pyversion ( 'C:\Python37\ python.exe' )
You can see the full documentation here - https://www.mathworks.com/help/matlab/ref/pyversion.html and it seems like they have come up with a new method since then. Hope it helps
Technically speaking, and theoretically speaking, the Python language can be restricted to that vocabulary and semantics which is strictly needed to run your script (if it did not includes libraries, otherwise they are considered parts of the script). Such a mini-Python can be implemented in Matlab, which is a programming language. It requiers the abilities of a Ph.D in compiler or interpreter constructions. But actually, Matlab is not a wonderfull DSL (domain small language) building tool.