<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def discover_python(self):
 """Get the Python interpreter we need to use to run our Notebook daemon."""

        python = sys.executable

        #: XXX fix this hack, uwsgi sets itself as Python
        #: Make better used Python interpreter autodiscovery
        if python.endswith("/uwsgi"):
            python = python.replace("/uwsgi", "/python")
        return python