code: def upload_file(
      *, file_name: str, bucket: str, prefix: Optional[str] = None
  ):
      """
      Upload a file to a S3 bucket
  
      Parameters
      ----------
      file_name: str,
          File to upload
      bucket: str,
          Bucket to upload to
      prefix: Optional[str], default = None
          S3 prefix. If not specified then will upload to the root of the bucket
      """
      import boto3
  
      object_name = os.path.basename(file_name)
      if len(prefix) == 0:
          prefix = None
      if prefix is not None:
          object_name = prefix + "/" + object_name
  
      # Upload the file
      s3_client = boto3.client("s3")
      s3_client.upload_file(file_name, bucket, object_name)
  
file_path: autogluon/common/src/autogluon/common/utils/s3_utils.py
imports: import logging
  import os
  import pathlib
  import shutil
  from typing import Dict, List, Optional, Tuple, Union
  from tqdm import tqdm
  from ..loaders.load_s3 import list_bucket_prefix_suffix_contains_s3
label_desc: Use image node_id 5 for calling a global function with example usage: upload_file() without return types