code: def join(*parts):
      
      try:
          path = [parts[0]]
      except IndexError:
          raise TypeError("need at least one argument")
      for p in parts[1:]:
          path[-1] = path[-1].rstrip("/")
          full = isfull(path[0])
          if isfull(p) or (isabs(p) and not full):
              path = [p]
          else:
              path.append(p.lstrip('/'))
      return "/".join(path)
docs: Join path name components, inserting ``/`` as needed.
  
      If any component is an absolute path (see :func:`isabs`), all
      previous components will be discarded.  However, full URIs (see
      :func:`isfull`) take precedence over incomplete ones:
  
      .. code-block:: python
  
        >>> import pydoop.hdfs.path as hpath
        >>> hpath.join('bar', '/foo')
        '/foo'
        >>> hpath.join('hdfs://host:1/', '/foo')
        'hdfs://host:1/foo'
  
      Note that this is *not* the reverse of :func:`split`, but rather a
      specialized version of :func:`os.path.join`. No check is made to determine
      whether the returned string is a valid HDFS path.