class_docstr: This class uploads a source file with presigned url to S3.
  
  Attributes
  ----------
  source_file: str
      Source file to upload
  presigned_url: str
      Presigned urls dictionary, with key as part number and values as urls
  retries: int
      Amount of retries when requests encounter an error
  total_size: int
      Size of all files to upload
  name: str
      Name of this upload to display progress
docstr: Upload files from source dir into target path in S3.
docstr_tok: ["Upload","files","from","source","dir","into","target","path","in","S3","."]
code: def upload(self) -> None:
      """Upload files from source dir into target path in S3."""
      no_task = self.task_id is None
      if self.use_progress and no_task:
          self.task_id = self.progress.add_task(
              "upload", filename=self.name, total=self.total_size
          )
          self.progress.start()
      try:
          with open(self.source_file, "rb") as f:
              data = f.read()
          self.upload_data(
              self.presigned_url,
              data,
              self.retries,
              self.disconnect_retry_wait_seconds,
          )
          if self.use_progress:
              self.progress.update(self.task_id, advance=len(data))
      finally:
          if self.use_progress and no_task:
              self.progress.stop()
  
file_path: pytorch-lightning/src/lightning/app/source_code/uploader.py
imports: import time
  import requests
  from requests.adapters import HTTPAdapter
  from rich.progress import BarColumn, Progress, TextColumn
  from urllib3.util.retry import Retry
label_desc: Use image node_id 4 for calling the FileUploader obj's underlying member method code with example usage: obj.upload() without return types