code: def set_python_version(python_version):
      global PYTHON_VERSION, PYTHON_VERSION_INFO, PREFIX, BIN_PYTHON, BIN_LORE, BIN_JUPYTER, BIN_FLASK, FLASK_APP
  
      PYTHON_VERSION = python_version
  
      if PYTHON_VERSION:
          PYTHON_VERSION_INFO = tuple(
              [
                  int(i) if i.isdigit() else i
                  for i in PYTHON_VERSION.split(".")
              ]
          )
          if platform.system() == "Windows":
              PREFIX = os.path.join(ROOT.lower(), ".python")
              bin_venv = os.path.join(PREFIX, "scripts")
              BIN_PYTHON = os.path.join(bin_venv, "python.exe")
              BIN_LORE = os.path.join(bin_venv, "lore.exe")
              BIN_JUPYTER = os.path.join(bin_venv, "jupyter.exe")
              BIN_FLASK = os.path.join(bin_venv, "flask.exe")
              FLASK_APP = os.path.join(
                  PREFIX,
                  "lib",
                  "site-packages",
                  "lore",
                  "www",
                  "__init__.py",
              )
          else:
              sys_prefix = os.path.realpath(sys.prefix)
              sys_version = "%s.%s.%s" % (
                  sys.version_info[0],
                  sys.version_info[1],
                  sys.version_info[2],
              )
              if ROOT in sys_prefix and PYTHON_VERSION == sys_version:
                  # launched python installed in a subdirectory of the App that has the correct version
                  PREFIX = sys_prefix
              else:
                  PREFIX = os.path.join(
                      PYENV, "versions", PYTHON_VERSION, "envs", APP
                  )
              python_major = "python" + str(PYTHON_VERSION_INFO[0])
              python_minor = (
                  python_major + "." + str(PYTHON_VERSION_INFO[1])
              )
              python_patch = (
                  python_minor + "." + str(PYTHON_VERSION_INFO[2])
              )
  
              BIN_PYTHON = os.path.join(PREFIX, "bin", python_patch)
              if not os.path.exists(BIN_PYTHON):
                  BIN_PYTHON = os.path.join(PREFIX, "bin", python_minor)
              if not os.path.exists(BIN_PYTHON):
                  BIN_PYTHON = os.path.join(PREFIX, "bin", python_major)
              if not os.path.exists(BIN_PYTHON):
                  BIN_PYTHON = os.path.join(PREFIX, "bin", "python")
              BIN_LORE = os.path.join(PREFIX, "bin", "lore")
              BIN_JUPYTER = os.path.join(PREFIX, "bin", "jupyter")
              BIN_FLASK = os.path.join(PREFIX, "bin", "flask")
              FLASK_APP = os.path.join(
                  PREFIX,
                  "lib",
                  python_minor,
                  "site-packages",
                  "lore",
                  "www",
                  "__init__.py",
              )
  
imports: from __future__ import absolute_import, print_function, unicode_literals
  import glob
  import locale
  import os
  import re
  import socket
  import subprocess
  import sys
  import platform
  from io import open
  import pkg_resources
  from lore import ansi
label_desc: Use image node_id 15 for calling a global function with example usage: set_python_version(python_version) without return types