code: def get_s3_multipart_chunk_size(filesize):
      
      if filesize <= AWS_MAX_MULTIPART_COUNT * AWS_MIN_CHUNK_SIZE:
          return AWS_MIN_CHUNK_SIZE
      else:
          div = filesize // AWS_MAX_MULTIPART_COUNT
          if div * AWS_MAX_MULTIPART_COUNT < filesize:
              div += 1
          return ((div + MiB - 1) // MiB) * MiB
docs: Returns the chunk size of the S3 multipart object, given a file's size.