docs: def main(*argv):
      """ main driver of program """
      try:
          username = str(argv[0])
          password = str(argv[1])
          baseURL = str(argv[2])
          folderId = str(argv[3])
          filePath = str(argv[4])
          #   Local variables
          #
          sh = None
          agol = None
          usercontent = None
          folderId = None
          proxy_port = None
          proxy_url = None
          #   Logic
          #
          if folderId == "":
              folderId = None
          if baseURL is None or \
             baseURL == "":
              baseURL = "https://www.arcgis.com/sharing/rest"
          sh = arcrest.AGOLTokenSecurityHandler(username=username, password=password)
          agol = arcrest.manageorg.Administration(url=baseURL, securityHandler=sh)
          usercontent = agol.content.usercontent(username)
          if isinstance(usercontent, arcrest.manageorg.administration._content.UserContent):
              pass
          res = usercontent.addItem(itemParameters=None, filePath=filePath, overwrite=True, folder=folderId)
          arcpy.SetParameterAsText(5, str(res))
      except arcpy.ExecuteError:
          line, filename, synerror = trace()
          arcpy.AddError("error on line: %s" % line)
          arcpy.AddError("error in file name: %s" % filename)
          arcpy.AddError("with error message: %s" % synerror)
          arcpy.AddError("ArcPy Error Message: %s" % arcpy.GetMessages(2))
      except FunctionError, f_e:
          messages = f_e.args[0]
          arcpy.AddError("error in function: %s" % messages["function"])
          arcpy.AddError("error on line: %s" % messages["line"])
          arcpy.AddError("error in file name: %s" % messages["filename"])
          arcpy.AddError("with error message: %s" % messages["synerror"])
          arcpy.AddError("ArcPy Error Message: %s" % messages["arc"])
      except:
          line, filename, synerror = trace()
          arcpy.AddError("error on line: %s" % line)
          arcpy.AddError("error in file name: %s" % filename)
          arcpy.AddError("with error message: %s" % synerror)