code: def join(a, *p):
      """Join two or more pathname components, inserting '/' as needed.
      If any component is an absolute path, all previous path components
      will be discarded.  An empty last part will result in a path that
      ends with a separator."""
      a = os.fspath(a)
      sep = _get_sep(a)
      path = a
      try:
          if not p:
              (
                  path[:0] + sep
              )  # 23780: Ensure compatible data type even if p is null.
          for b in map(os.fspath, p):
              if b.startswith(sep):
                  path = b
              elif not path or path.endswith(sep):
                  path += b
              else:
                  path += sep + b
      except (TypeError, AttributeError, BytesWarning):
          genericpath._check_arg_types("join", a, *p)
          raise
      return path
  
imports: import os
  import sys
  import stat
  import genericpath
  from genericpath import *
label_desc: Use image node_id 4 for calling a global function with example usage: join(a) and returns: path