code: def upload(
      self, source: Optional[str] = None, target: Optional[str] = None
  ):
      if source is None and target is None:
          self._push_local_dir()
          return
  
      assert isinstance(source, str)
      assert isinstance(target, str)
  
      remote_upload_to = self._generate_tmp_cloud_storage_path()
  
      # local source -> s3
      self._run_with_retry(
          lambda: self.s3_client.upload_file(
              Filename=source,
              Bucket=self.bucket,
              Key=remote_upload_to,
          )
      )
  
      # s3 -> remote target
      bucket_address = (
          f"{S3_CLOUD_STORAGE}://{self.bucket}/{remote_upload_to}"
      )
      retcode, _ = self.job_manager.run_and_wait(
          "pip install -q awscli && "
          f"aws s3 cp {bucket_address} {target}",
          {},
      )
  
      if retcode != 0:
          raise FileUploadError(
              f"Error uploading file {source} to {target}"
          )
  
      self.delete(remote_upload_to)
  
imports: import os
  import shutil
  import sys
  import tempfile
  from typing import Optional
  import boto3
  from google.cloud import storage
  from ray_release.aws import RELEASE_AWS_BUCKET
  from ray_release.cluster_manager.cluster_manager import ClusterManager
  from ray_release.exception import FileDownloadError, FileUploadError
  from ray_release.file_manager.file_manager import FileManager
  from ray_release.job_manager import JobManager
  from ray_release.logger import logger
  from ray_release.util import exponential_backoff_retry, generate_tmp_cloud_storage_path, S3_CLOUD_STORAGE, GS_CLOUD_STORAGE, GS_BUCKET
label_desc: Use image node_id 7 for calling the JobFileManager obj's underlying member method code with example usage: obj.upload(source, target) without return types