<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_interpreter_path(version=None):
 """Return the executable of a specified or current version."""

    if version and version != str(sys.version_info[0]):
        return settings.PYTHON_INTERPRETER + version
    else:
        return sys.executable