code: def convert_path(pathname):
      """Return 'pathname' as a name that will work on the native filesystem,
      i.e. split it on '/' and put it back together again using the current
      directory separator.  Needed because filenames in the setup script are
      always supplied in Unix style, and have to be converted to the local
      convention before we can actually use them in the filesystem.  Raises
      ValueError on non-Unix-ish systems if 'pathname' either starts or
      ends with a slash.
      """
      if os.sep == "/":
          return pathname
      if not pathname:
          return pathname
      if pathname[0] == "/":
          raise ValueError("path '%s' cannot be absolute" % pathname)
      if pathname[-1] == "/":
          raise ValueError("path '%s' cannot end with '/'" % pathname)
  
      paths = pathname.split("/")
      while "." in paths:
          paths.remove(".")
      if not paths:
          return os.curdir
      return os.path.join(*paths)
  
imports: import os
  import re
  import importlib.util
  import string
  import sys
  import distutils
  from distutils.errors import DistutilsPlatformError
  from distutils.dep_util import newer
  from distutils.spawn import spawn
  from distutils import log
  from distutils.errors import DistutilsByteCompileError
label_desc: Use image node_id 3 for calling a global function with example usage: convert_path(pathname) and returns: os, pathname, pathname, os