code: def join(*paths):
      # type: (*Text) -> Text
      
      absolute = False
      relpaths = []  # type: List[Text]
      for p in paths:
          if p:
              if p[0] == "/":
                  del relpaths[:]
                  absolute = True
              relpaths.append(p)
  
      path = normpath("/".join(relpaths))
      if absolute:
          path = abspath(path)
      return path
docs: Join any number of paths together.
  
      Arguments:
          *paths (str): Paths to join, given as positional arguments.
  
      Returns:
          str: The joined path.
  
      Example:
          >>> join('foo', 'bar', 'baz')
          'foo/bar/baz'
          >>> join('foo/bar', '../baz')
          'foo/baz'
          >>> join('foo/bar', '/baz')
          '/baz'