code: def use_embedded_pkgs(embedded_lib_path=None):
      
      if embedded_lib_path is None:
          embedded_lib_path = get_embedded_lib_path()
  
      old_sys_path = list(sys.path)
      sys.path.insert(
          1,  # https://stackoverflow.com/a/10097543
          embedded_lib_path
      )
      try:
          yield
      finally:
          sys.path = old_sys_path
docs: Temporarily prepend embedded packages to sys.path.