code: def join_url_parts(*args):
      
      # check for edge case
      if len(args) == 1:
          return args[0]
  
      return_val = clean_url_segment(args[0])
  
      for i in range(1, len(args)):
          arg = args[i]
  
          if i == len(args) - 1:
              # no need to remove a trailing slash if this is the last segment
              return_val += '/' + arg
          else:
              # remove a trailing slash so it won't be duplicated
              return_val += '/' + clean_url_segment(arg)
  
      return return_val
docs: Joins a list of segments into a URL-like string
      :type args: List<string>